At 9:44 AM -0800 3/1/2006, Garrett Hylltun wrote:
Is there a built-in function in Rev that will convert RGB color string to a HEX color string? If no, does anyone know how to do this? I knew how to do this in another language, but am at a loss as to how to work it out in Rev.

Here's a code snippet:

 put "#" into theWebColor -- leading "#"
 repeat for each item myItem in theColorNumber -- numeric triplet - R,G,B
    get baseConvert(myItem,10,16)
if the length of it is 1 then put zero before it -- each component must be 2-digit
    put it after theWebColor
  end repeat

--
jeanne a. e. devoto ~ [EMAIL PROTECTED]
http://www.jaedworks.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to