RGB valuesfor a color name

Phil Davis revdev at pdslabs.net
Fri Jul 3 18:27:21 EDT 2009


Thanks Scott! This is more usable in a commercial project than my 
suggestion. But I had to chuckle - "Not sure why it works, but...". Some 
things are like that.

Best -
Phil


Scott Rossi wrote:
> Recently, James Hurley wrote:
>
>   
>> I'm surprise that mouseColor is the only function that returns the RGV
>> values of named colors.
>>     
>
> This is the way I do it (requires an object).  Starting with a graphic, for
> example:
>
> set the backColor of grc 1 to <colorname>
> set the backPixel of grc 1 to the effective backPixel of grc 1
> get the backcolor of grc 1
>
> Not sure why it works, but it does for me.
>
> Regards,
>
> Scott Rossi
> Creative Director
> Tactile Media, Multimedia & Design

-- 
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net




More information about the use-livecode mailing list