Page 1 of 1

color convertion

Posted: Tue Jun 08, 2010 6:56 am
by shadowslash
In a revTalk script, how would I convert the colors I got from the answer color command to result into an HTML-formatted code?

E.g:
I got 255,255,255 in the variable it after using the answer color command, how would I turn that to #FFFFFF which is it's HTML counterpart.

Thank you so much for those who would help me out with this problem.

Re: color convertion

Posted: Tue Jun 08, 2010 7:22 am
by Mark
shadowslash,

Code: Select all

put "123,234,241" into myRGB
put "#" into myHex
repeat for each item myItem in myRGB
  put baseConvert(myItem,10,16) after myHex
end repeat
Best regards,

Mark