Re: Gimp color question
- From: Sven Neumann <sven gimp org>
- To: Vicki Stanfield <vicki dialupnet com>
- Cc: GTK-List <gtk-list gnome org>
- Subject: Re: Gimp color question
- Date: 20 May 2001 01:00:38 +0200
Hi,
Vicki Stanfield <vicki dialupnet com> 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]