[gtkada] How do you specify the color?
Emmanuel Briot
briot at ACT-Europe.FR
Fri Apr 12 10:45:57 CEST 2002
"Victor Pablos" <victorpablos at hotmail.com> writes:
> I am doing an application which prints different colors on the window. My
> problem is that these colors came in number formats (255, 255, 255) which means
> 255 red 255 green 255 blue. How can I convert these format to gtkada format? I
> know there must be a way of doing this, but how?
Set_Rgb (Color,
Blue => Guint16 (your_blue * Guint16'Last / 255),
Red => Guint16 (your_red * Guint16'Last / 255),
Green => Guint16 (your_green * Guint16'Last / 255));
should do the trick.
Emmanuel
More information about the gtkada
mailing list