Re: about the color



As followed:
#define  GTK_RED  0xffff,0x0000,0x0000
I don't understand why the red is "0xffff,0x0000,0x0000", but RGB is
"255,0,0"

The GdkColor struct uses three 16-bit integers to represent the RGB
components of a colour. Thus the max value for each component is
0xffff. The 255 you mention is the max value when 8 bits are used per
component.

--tml



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]