translating a color name to RGB triplet

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

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

> 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


Ken Ray
Sons of Thunder Software
Web site:
Email: kray at

More information about the Use-livecode mailing list