Re: rgb number scheme



On Mon, 2005-04-25 at 16:01 -0600, John Taber wrote:
> gtkmm uses the gdk color  r_g_b numbering scheme that goes from 0-65535 
> instead of the more normal 0-255.  Can anyone explain what the 65535 is based 
> on.   I'm guess we have to divide all our color numbers and use 
> set_rgb_p(...) - I'm wondering why there isn't a set_rgb method for using the 
> normal 0-255 range.  

Each component is a short, so 16 bits for each color channel.  It's
simple to convert short to byte and vice versa.

Regards,
Carl




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