Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 141
  • Last Modified:

point

I retrieve the color of a pixel with the point command...
problem though is that i get a strange large number like 543005 or something like that.

Is it possible to change this number into a html color, like: #FFFFFF for white

??
0
michael123199
Asked:
michael123199
1 Solution
 
olxCommented:

HEX(StrangeNumberObtained) ?

in vb the # stands for double precision, but in html have no idea
0
 
Arthur_WoodCommented:
Actually what you want to do is to PARSE that number into its three parts: Red + 256*(Green+ 256*Blue))

red = 29 = #1D (Hex)
Green = 73 = #49 (Hex)
Blue = 8 = &08 (Hex)

so the hex string would be #08491D or #BBGGRR

you can also get this with the HEX() function:

Hex(543005) = 8491D = #BBGGRR ==> BB=08, GG=49, RR=1D

Arthur Wood
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now