Color selection

2006-12-21 Thread Alexander S.Kresin
Hi All,

I have a problem with a color selection dialog.
The RGB values in the dialog itself are shown as 0..255 for each of
the red, green, blue; but the values, returned by 
gtk_color_selection_get_current_color (colorsel, color)
in color.red, color.green, color.blue are in the range 0..65535.
How can I convert them to the 0..255 for to be able to get Windows
compatible long value by color.red + color.green*255 +
color.blue*65535 ?


-- 
Regards,
 Alexander
http://kresin.belgorod.su


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Color selection

2006-12-21 Thread John Coppens
On Thu, 21 Dec 2006 11:24:19 +0300
Alexander S.Kresin [EMAIL PROTECTED] wrote:

 How can I convert them to the 0..255 for to be able to get Windows
 compatible long value by color.red + color.green*255 +
 color.blue*65535 ?

Divide them by 256?

John
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list