HTML Is Your Friend/ pg. 20

APPENDIX B: COLOR REFERENCE CHART

Color is an important consideration for your website. The right colors could make the reader's experience at you site that much better and fufilling.

  1. Hexadecimal System
  2. The Netscape Color Cube


The Hexadecimal System

First let's talk about the way a computer moniter works. Don't worry, it's easy and you might learn something useful. Computer monitors, and TVs, use something called a cathode ray tube to generate the image. Essentially, at one end of the CRT there is an electron gun which shoots out free electrons whose paths are controlled by magnets. These electrons strike the other end of the tube, which happens to be the sceen. The electrons hit phosphors, which are tiny dots of chemicals; these phosphors come in only three colors, red, green, and blue. Those three colors happen to be the principle colors of light; you might confuse this with the primary colrors of pigments, which happend to be cyan, magenta, yellow, and black.
      Red green and blue light is able to generate any visible color. That's why you code the colors in hexadecimal by pairs of values, the first two numbers for red, the next two for green, and the last two for blue, like below:

bgcolor=#ffffff


But that still doesn't help you understand the number system, right? Well, the hexadecimal number system is base 16; that is there are 16 values whereas the regular decimal system only has 10 (0,1,2,3,4,5,6,7,8,9). But since we don't have a single digit for the numbers 10, 11, 12, 13, 14, or 15, we use letters; a=10, b=11, c=12, d=13, e=14, and f=15; remember that we count "0" as a number, bringing the total to 16 digits.

If you understand the colors and the numbers now, you can create colors by yourself. There are a few things to remember:

  • Black is #000000 and white is #ffffff. The lack of color is black while all the colors combined are white.
  • The secondary colors: Red + green = yellow. Green + blue= cyan. Blue + red = magenta.
  • Gray is an even mix of all the colors, such as #aaaaaa or #444444.

But you don't have to create all the colors freehand, as it were. The Netscape Corporation has set a generally followed standard color palette, which is described below.

The Netscape Color Cube

Although by no means a set standard, the Netscape color cube should be used for maximum compatablilty. Netscape has defined 216 colors for it's browser that are cross-platform, meaning both Macs and PCs can show those. Macs are allowed 256 colors because of dithering (placing colors close to create the illusion of other colors), whereas PCs can't. There are several good sites that descibe the cube better than I can.



Now I hope you have a better sense of color. Next up is a list of special characters.