Color me CC0000

Posted on January 8, 2001

Colors. Colors.

Perhaps you have noticed the various possibilities of color schemes on various Web pages. Perhaps you haven't, because you actually pull your sweater above your head and type on your computer with your toes. Either way, deciding on the perfect shade or hue can usually be done. It's just not as easy as picking up a crayon.

Colors are defined in hexadecimal code, which is essentially just counting to 16 using extra symbols. I will now attempt to explain this mathematical concept, so for those of you who are sketchy in math, here are a few warm-up questions:

1. 4+4 = 8

2. Eight squared equals 64

3. If a plane crashes on the US-Canada border carrying 56 Americans, 32 Canadians, 12 Mexicans, five country line dancers, three cows and an English muffin, the survivors are not buried (although the country line dancers need to atone for their hobby by doing extensive community work).

The counting system you and I use on a regular basis is what's known as base 10. You have digits 0-9, and to get above 9, you start over and create a tens column, with the number 10. Hexadecimal is base 16, which means we need six extra symbols. Prince was not available to create new ones, so instead, the letters A-F were used. The only reason you think base 10 is easy to understand is because that's what you have learned all your life. Those English guys were on to something with base 12 (12 is evenly divisible by 1, 2, 3, 4, 6 and 12), but like disco, it didn't stay with us long enough. Base 16 is also useful, being evenly divisible by 1, 2, 4, 8 and 16, and it can be squared. Base 10 has practically no usefulness. There's probably a good reason people starting counting in tens, but I cannot put my fingers on it.

Every html color is classified by six characters. The first two characters constitute the red in a particular hue, the second set green and the third set blue. This is because Web colors are classified as RGB (red/green/blue) as opposed to CMYK (cyan/magenta/yellow/black) or YMCA (I have nothing against the Village People, but will everyone please stop gyrating to that song?).

Black is 000000 (those are zeroes). White is defined as FFFFFF. In hexadecimal, if you were going to count, you would say 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D, 1E, 1F, you get the idea. Just don't say the numbers out loud or else the person in the next cubicle might think you are confirming your allegiance to Johnny Cash. If you are still in the dark, Webmonkey's explanation of hexadecimal code may help. Or if you prefer a Webmade hexadecimal counting chart, go here.

With only a ones and tens place, you can have 256 different combinations, starting at 0 (or 00) and going to FF. So for each color, you have 256 options of red, 256 options of green and 256 options of blue.

Depending on what types of Web sites you are viewing and/or designing, you may never use this material. For news sites, you will most likely see black text on a white background, or some close variation, because that's the easiest to read. But if you want to add different colors to your graphics, this information will be valuable. Most graphics programs have color palettes you can choose either visually or by hexadecimal code. If you want colors to match exactly, it's much easier to type in the code than attempt to pick the correct shade.

Some graphics programs even allow you to pick a color, called an eyedropper, out of an existing picture. That can be used if you find a pleasing color, and you want to know the exact code to get back to it in the future. I found two color lookup sites -- the Excite Hexadecimal Lookup and Netscape's Hexadecimal Color Resources.

Math and coloring have to be two of my top three subjects the other is slamming country music. Luckily I haven't tried to finger-paint my name onto my computer screen yet. I'm too busy counting in hexadecimal, and I've made it up to B2. That's equal to 179, not a bingo. A few more practices, and you'll be ready to convert your line dancing steps to hexadecimal as well.