When is a color not a color

Peter Haworth pete at lcsql.com
Tue Jun 11 16:07:08 EDT 2013


Thanks Mark.  I entered a bug report on this and it is being investigated.
 Meantime, I check for all the other "is a" possibilites first, then do my
own check for a color.

Pete
lcSQL Software <http://www.lcsql.com>


On Tue, Jun 11, 2013 at 12:19 PM, Mark Wieder <mwieder at ahsoftware.net>wrote:

> 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
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list