Return to my Computer Pages
Go to my home page
© Copyright 1998, Jim Loy
Using the <BODY> tag, you can specify colors for your whole document. These colors can be specified in hex RGB numbers. Here are the more basic colors:
Color RRGGBB white ffffff red ff0000 green 00ff00 blue 0000ff yellow ffff00 magenta ff00ff cyan 00ffff black 000000
And, the body tag may look like this:
<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#ff0000" ALINK="#00a000">
The "#" sign means hex (base 16). This one produces white background, black text, blue unvisitied links, red visited links, and green active links. You may not want to mess with the colors of the links, as that may confuse users. White text on black background may print white on white on the user's printer. And various color combinations may be unreadable on a black and white laptop.
Some browsers support the use of color names, such as "white" (shown in black here), "red", "green", "blue", "yellow", "magenta", "cyan", "black", and many others. But, just because your browser supports these names, does not mean that your audience's browsers will support them. Netscape and presumably Internet Explorer support them.
Netscape, and presumably Internet Explorer, also supports the use of color for a smaller piece of text, as I have done in this article. To make red appear red, I used this tag:
<FONT COLOR="#FF0000">red</FONT>
Remember, other browsers may not support this feature. But, they should ignore the tags and print the word or words in black.
Some of the colors:
| 000000 | 000033 | 000066 | 000099 | 0000cc | 0000ff |
| 003300 | 003333 | 003366 | 003399 | 0033cc | 0033ff |
| 006600 | 006633 | 006666 | 006699 | 0066cc | 0066ff |
| 009900 | 009933 | 009966 | 009999 | 0099cc | 0099ff |
| 00cc00 | 00cc33 | 00cc66 | 00cc99 | 00cccc | 00ccff |
| 00ff00 | 00ff33 | 00ff66 | 00ff99 | 00ffcc | 00ffff |
| 330000 | 330033 | 330066 | 330099 | 3300cc | 3300ff |
| 333300 | 333333 | 333366 | 333399 | 3333cc | 3333ff |
| 336600 | 336633 | 336666 | 336699 | 3366cc | 3366ff |
| 339900 | 339933 | 339966 | 339999 | 3399cc | 3399ff |
| 33cc00 | 33cc33 | 33cc66 | 33cc99 | 33cccc | 33ccff |
| 33ff00 | 33ff33 | 33ff66 | 33ff99 | 33ffcc | 33ffff |
| 660000 | 660033 | 660066 | 660099 | 6600cc | 6600ff |
| 663300 | 663333 | 664066 | 663399 | 6633cc | 6633ff |
| 666600 | 666633 | 666666 | 666699 | 6666cc | 6666ff |
| 669900 | 669933 | 669966 | 669999 | 6699cc | 6699ff |
| 66cc00 | 66cc33 | 66cc66 | 66cc99 | 66cccc | 66ccff |
| 66ff00 | 66ff33 | 66ff66 | 66ff99 | 66ffcc | 66ffff |
| 990000 | 990033 | 990066 | 990099 | 9900cc | 9900ff |
| 993300 | 993333 | 993366 | 993399 | 9933cc | 9933ff |
| 996600 | 996633 | 996666 | 996699 | 9966cc | 9966ff |
| 999900 | 999933 | 999966 | 999999 | 9999cc | 9999ff |
| 99cc00 | 999933 | 999966 | 999999 | 99cccc | 99ccff |
| 99ff00 | c0ff40 | c0ff66 | c0ff99 | 99ffcc | 99ffff |
| cc0000 | cc0033 | cc0066 | cc0099 | cc00cc | cc00ff |
| cc3300 | cc3333 | cc3366 | cc3399 | cc33cc | cc33ff |
| cc6600 | cc6633 | cc6666 | cc6699 | cc66cc | cc66ff |
| cc9900 | cc9933 | cc9966 | cc9999 | cc99cc | cc99ff |
| cccc00 | cccc33 | cccc66 | cccc99 | cccccc | ccccff |
| ccff00 | ccff33 | ccff66 | ccff99 | ccffcc | ccffff |
| ff0000 | ff0033 | ff0066 | ff0099 | ff00cc | ff00ff |
| ff3300 | ff3333 | ff3366 | ff3399 | ff33cc | ff33ff |
| ff6600 | ff6633 | ff6666 | ff6699 | ff66cc | ff66ff |
| ff9900 | ff9933 | ff9966 | ff9999 | ff99cc | ff99ff |
| ffcc00 | ffcc33 | ffcc66 | ffcc99 | ffcccc | ffccff |
| ffff00 | ffff33 | ffff66 | ffff99 | ffffcc | ffffff |
The colors with three identical pairs of digits (like c4c4c4) are the various shades of gray. The above table only has color hex values 00, 33, 66, 99, cc, and ff. The reason is that other color values do not display well on browsers with 256 colors, as the browser may dither the color (use dots or lines of two different colors) or substitute other colors. As that is only 216 colors (as shown here), I'm not sure where the other 40 colors can be found (they seem to not exist).