请问一种颜色比如$00CDF4B5是怎么得出来?它和RGB之间有什么联系?(50分)

  • 主题发起人 主题发起人 星幻子
  • 开始时间 开始时间

星幻子

Unregistered / Unconfirmed
GUEST, unregistred user!
分不多请见谅
 
从后往前数,B5对应B,F4对应G,CD对应R。
 
看Tcolor帮助:
If you specify TColor as a specific 4-byte hexadecimal number instead of using the constants defined in the Graphics unit, the low three bytes represent RGB color intensities for blue, green, and red, respectively. The value $00FF0000 (Delphi) or 0x00FF0000 (C++) represents full-intensity, pure blue, $0000FF00 (Delphi) or 0x0000FF00 (C++) is pure green, and $000000FF (Delphi) or 0x000000FF (C++) is pure red. $00000000 (Delphi) or 0x00000000 (C++) is black and $00FFFFFF (Delphi) or 0x00FFFFFF (C++) is white.

If the highest-order byte is zero, the color obtained is the closest matching color in the system palette. If the highest-order byte is one ($01 or 0x01), the color obtained is the closest matching color in the currently realized palette. If the highest-order byte is two ($02 or 0x02), the value is matched with the nearest color in the logical palette of the current device context.
 
非常感谢!!
 
后退
顶部