Best way to convert color values

Paul Dupuis paul at researchware.com
Wed Aug 7 12:04:42 EDT 2024


You have RGB colors (0-255,0-255,0-255), Hex colors (#000000 - #FFFFFF) 
and named colors ("blue") in Livecode

Any built in way (via some trick) to convert between color value formats?

I can always write a routine to convert RGB to Hex and Hex to RGB, but I 
am wondering if there is some clever trick in Livecode to do this.

For example: answer color -- returns RGB, but the htmlText of a line 
wants <p bgcolor="#NNNNNN"> </p>

Thanks in advance,



More information about the use-livecode mailing list