Code: Select all
get the backgroundcolor of control ID "1003"
put it into myColorVar
put myColorVar into fld "colorID"
how would I get the hex value of that same value, like this, #0000FF
Thanks for any guidence and or suggestions
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
get the backgroundcolor of control ID "1003"
put it into myColorVar
put myColorVar into fld "colorID"
Code: Select all
repeat with x =1 to the number of items in myColorVar
put baseconvert(item x of myColorVar,10,16) after tHex
end repeat
Code: Select all
repeat with x =1 to the number of items in myColorVar
put baseconvert(item x of myColorVar,10,16) into tHex
if the number of chars in tHex < 2 then
put "0" before tHex
end if
put tHex after myHexColorVar
end repeat
put "#" before myHexColorVar