第1个回答 推荐于2017-09-24
UInt16 C =0x597f; //16进制颜色值
byte R,G,B; //8位RGB值
R =(byte) (C>> 10); //取出高位R的分量
G =(byte)((C>> 5) &0x1f); //取出高位G的分量
B =(byte)(C&0x1f); //取出高位B的分量
Color c =Color.FromArgb(255,R,G,B); //这个是16位组合5位R、5位G、5位B
Color c =Color.FromArgb(255,0xff,0,0); //#ff0000 这个是24位组合8位R、8位G、8位B