[Walrus-dev] color

Young Hyun youngh@caida.org
Thu, 20 Feb 2003 12:53:53 -0800 (PST)


On Thu, 13 Feb 2003, [ISO-8859-2] Sylwester Krzemiński wrote:

> Is this correct ?
> or maybe it should be:
>
> 	color = ((R * 256) + G) * 256 + B. ?

You're correct: the multipliers should all be 256 and not 255.
I made a mistake translating the actual code

   (R << 16) | (G << 8) | B

to an algebraic form that most people can understand.

 --Young