html color chart

click me for a bigger version (0.5Mb)

The rgb (red, green, blue) color cube can be sliced like a loaf of bread to show the full range of colors. The rotating graphic at left has six slices, to show the 216 (6x6x6) Netscape colors. Click on the image below, or the red, green, or blue, to see 16 slices in those directions. Although there are three pages, each one shows all the colors, just arranged differently. (Note: even though each table is only 200K, it loads quite slowly.)

As you move the cursor over the color slices, the 6-digit hex code of that color will be displayed (on browsers that display the "alt=" information). Either way, the color value can be read off the scales.

blue click here for color chart Blue Chart Green Chart Red Chart green

Technical details
The color charts are tables with each cell's background color set to the appropriate value. To control the size of each cell, a small invisible image is loaded into each cell (in this instance, an 8x8 pixel image).

A perl script ( was used to generate the color lookup charts, incrementing the color values for the background of each cell. Since each cell needed quite a lot of html-verbiage, the files ended up being quite large (228k). The verbiage for each cell is basically

<td bgcolor=feeb1e><img src=pix8.gif alt=feeb1e></td> Speaking of which, be sure to check out the feeb1e page!

They wont print!
Actually, I think you can now set your browser to print backgrounds. When I first made these pages web page backgrounds didn't print :-(. One way around this is to do a screen grab. A better method altogether would be to generate little color gifs of 256x256 pixels, with nice color gradations.

If you have a color PostScript printer, I made a color chart in postscript that will print. In fact, this html color chart is modelled on that program.

Colour! Links