option explicit
' Get the decimal RGB values from the user (0 through 255)...
dim r, g, b
r = hex(inputbox("Enter red value (between 0 and 255):", "HTML Color"))
g = hex(inputbox("Enter green value (between 0 and 255):", "HTML Color"))
b = hex(inputbox("Enter blue value (between 0 and 255):", "HTML Color"))
' Pad the hex value with a zero if needed...
r = string(2 - len(r), "0") & r
g = string(2 - len(g), "0") & g
b = string(2 - len(b), "0") & b
' Create the HTML hex color string...
dim s: s = "#" & r & g & b
' Paste this into IE...
dim ie
set ie = createobject("internetexplorer.application")
ie.height = 100
ie.width = 300
ie.menubar = false
ie.toolbar = false
ie.statusbar = false
ie.addressbar = false
ie.navigate "about:blank"
do while ie.busy
wscript.sleep 50
loop
ie.document.write "HTML Color" & s & ""
ie.visible = true