[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: about the color
- From: "Tor Lillqvist" <tml iki fi>
- To: "zhenghe zhang" <zhenghe zhang gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: about the color
- Date: Tue, 20 Jan 2009 13:09:50 +0200
> 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]