Hi,
Vicki Stanfield <[EMAIL PROTECTED]> writes:
> I want to use a color that exists in a logo that I have. The gimp says
> the color is 99 red, 8 green, 206 blue, and an alpha channel value that
> I can't recall right off. How do I convert these numbers for use in the
> initialize of RGB values of GdkColor? I tried:
>
> color.red = 99;
> color.green = 8;
> color.blue = 206;
GDK colors are 16 bit per color channel, so the formula to convert is:
color.red = r << 8 + r;
color.green = g << 8 + g;
color.blue = b << 8 + b;
where r, g, b are 8 bit color values.
Salut, Sven
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list