translating a color name to RGB triplet

Ken Ray kray at sonsothunder.com
Fri Sep 8 16:00:40 EDT 2006


On 9/8/06 2:29 PM, "Stephen Barncard" <stephenREVOLUTION at barncard.com>
wrote:

> somewhere within the bowels of Rev must be a way to convert this directly.
> 
> I know you can input colornames to 'Answer Color'
> 
>      answer color with "AliceBlue"
>      put it into fld "output2"
> 
> (it contains 239,247,255)
> 
> and of course this works -
> 
>        set the backgroundcolor of btn "toadMeat" to "LightYellow"
> 
> but when you get the color back from the object
> 
>         get colors of btn "toadMeat")
>         replace numToChar(11) with return in x
>         put it into fld "output2"
> 
> you can see "AliceBlue" in line 3 in fld output2.
> 
> (I was hoping to see the numbers!!)

Very interesting! If you do the same thing with a graphic, you get the RGB
values back... how odd!

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the Use-livecode mailing list