[Walrus-dev] color

Sylwester Krzemiński acuario@go2.pl
Thu, 13 Feb 2003 01:16:52 +0100


>From guide.txt:

>Integer attributes should encode the red, green, and blue components of a
>color into 32 bits in the order (_, R, G, B), with blue occupying the
>lowest eight bits and red occupying the next to highest eight bits.  More
>precisely, given R, G, and B,
>
>         color = ((R * 255) + G) * 255 + B.

Is this correct ?
or maybe it should be:

	color = ((R * 256) + G) * 256 + B. ?

I'm asking becouse if we agree that 
	color = ((R * 255) + G) * 255 + B.
then R=1, G=1, and B=0 will be the same as R=1, G=0, and B=255. 
So what is the Black in RGB ?







Sylwester