RGB values for a color name

Phil Davis revdev at pdslabs.net
Fri Jul 3 15:45:59 EDT 2009


Depending on your use, maybe this will help:

  set the backgroundColor of control <yourColorObject> to "gray40"
  set the screenMouseLoc to globalLoc(the loc of <yourColorObject>)
  put the mouseColor -- puts "102,102,102"

Judging from this and Richmond's reply, it appears you have to do the 
name-to-triplet translation indirectly, through the setting and getting 
of an object's properties. But maybe someone else will pipe in...

Phil Davis



James Hurley wrote:
> How do I translate a color name (Blue1 for example) into its RGB 
> values? Programatically.
>
> Jim Hurley 

-- 
Phil Davis

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




More information about the use-livecode mailing list