At 12:36 AM -0400 6/29/2004, Simon Lord wrote:
How can I turn 0,0,0 into #000000 or 255,255,255 into #FFFFFF? Anyone have the secret for converting rgb to webcolors?

Web colors are just 3 base-16 numbers, one for each item of the RGB numeric color:


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 "0" before it -- each component must be 2-digit
put it after theWebColor
end repeat


--
jeanne a. e. devoto ~ [EMAIL PROTECTED]
http://www.jaedworks.com
_______________________________________________
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard

Reply via email to