When is a color not a color
Mark Wieder
mwieder at ahsoftware.net
Tue Jun 11 19:27:00 EDT 2013
BNig <niggemann at ...> writes:
>
> I guess the numbers 1 to 256 refer to some color look up table for 8 bit
> color that is somehow in the engine?
Exactly. There's an array of 256 RGB values in uidc.cpp.
If only one number is present, the parsecolor algorithm restricts it to a
value between 1 and 256, then uses that number to retrieve the corresponding
array element and extracts the RGB values (0-255) from it.
Then, for some reason I haven't wrapped my head around, it seems to multiply
those RGB values by 257 for later use.
Hmmm... everything was going so well up to that point.
--
Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list