You are here

Learning HTML color codes (converting RGB to hexadecimal)

I've been trying to understand how html color codes (hex codes) work and how colors mix so I can experiment with my own color schemes more intuitively. I came across a decent article at sitepronews (Understanding HTML Color Codes) that explained a little bit about the hexadecimal part. It seems intuitve but I learned that the Hex option on the Windows Calculator can help determine the hex values. So ... if you have a color code like (10, 30, 128), you can look it up using the calculator. First type in 10 in “Dec” mode and then choose the “Hex” radio button. You get an A. Since its only one character this means 0A. Now switch back to “Dec” and type in 30, then switch to “Hex” and you get 1E. Repeat this process for 128 and you get 80. Therefore your hex code is #0A1E80. This will keep me from going to Pixie and hovering over a rendered color every time I need to know the hex value. BTW ... Pixie (now at version 3.1) is a great little (and I do mean little) application that comes in very handy for picking colors. I highly recommend it. Knowing how colors mix together (for me at least) requires some memorization. I just can't seem to keep it all straight. With additive color mixing, Cyan is between blue and green, yellow is between green and red and magenta is between red and blue. The reverse is true with subtractive mixing (red from mixing magenta and yellow, green from mixing yellow and cyan, and blue from mixing cyan and magenta). I won't go into HSB/HSV you can see more by visiting wikipedia's page on color space
Topic: