David, below is part of a script from my Color Picker utility. Hope it helps.
-Chipp on mouseDown put the mouseColor into thecolor set the numberFormat to "##" put formathex(baseConvert(item 1 of thecolor,10,16)) into R put formathex(baseConvert(item 2 of thecolor,10,16)) into G put formathex(baseConvert(item 3 of thecolor,10,16)) into B put thecolor into cd fld "rgb" of cd "stageLg" of stack "HemTools" put "#" & R & G & B into cd fld "hex" of cd "stageLg" of stack "HemTools" go to cd "stage" of stack "Hemtools" click at the loc of btn "Open Button" set the menuHistory of button "tabs" to 2 end mouseDown function formathex thevalue if the length of thevalue is 1 then put "0" before thevalue return thevalue end formathex -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of David Bovill Sent: Sunday, January 06, 2002 4:30 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Converting colour names: Hex & RGB colour values... There are three ways of specifying a colour: name, rgb, and htm hexcolour... How do I convert between them? I was about to write a routing to convert rgb to html colour values, and I couldn't get around the problem of the colour functions returning colour names instead of rgb triplets - anyway I am sure there must be a built in technique? _______________________________________________ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard _______________________________________________ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
