When is a color not a color
Mark Wieder
mwieder at ahsoftware.net
Tue Jun 11 15:19:09 EDT 2013
Peter Haworth <pete at ...> writes:
> As mentioned in my original post, I thought they were either three numbers
> each between 0-255, a hex value, or a color name, but it sounds like it's
> possible to have a 4th integer as an alpha channel? IS that correct?
I can't say whether it's right or not, but here's what the color parser in
the engine code (in uidc.cpp) does:
check for a number
if that fails,
check against the colornames
return boolean for the colornames check
else
check for a second number (g value)
if only one number
dissect the first number into rgb components
else (we have r&b values) <g>
get a third number (g value)
if only two numbers, return False
parse the rgb values into a color variable
return True
so 4th through nth numbers will just be ignored.
--
Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list