Absolutely. The "index" of a color (what is returned from
screen.rgb(r,g,b)) is simply this:
(r << 16) + (g << 8) + b
This is easy to see if you print out the index values in hexadecimal.
For instance screen.rgb(255,0,0) returns 16711680 which is 0xFF0000.
You can read it right off: FF (i.e. 255) red, 0 blue, 0 green.
--- In
plua@..., "ibelcomputing" <ibelcomputing@...> wrote:
>
> My question is, exactly as title says, is there any way to know the R,
> G and B values of a color given its index?
>