translating a color name to RGB triplet

Ken Ray kray at sonsothunder.com
Fri Sep 8 13:31:47 EDT 2006


On 9/8/06 7:32 AM, "KALANGI Vijay BABU" <VijayBABU.KALANGI at insead.edu>
wrote:

> Hi All,
> 
>  
> 
> Can somebody suggest me a way to "translate a color name to RGB triplet"

Well you need to have a graphic object (like a square) and then execute this
(I called my graphic "ColorHolder"):

function getRGB pColorName
      put the long id of grc "ColorHolder" into tObj
      set the backColor of tObj to pColorName
      set the backPixel of tObj to (the effective backPixel of tObj)
      return (the backColor of tObj)
end getRGB

HTH,

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