The Web Color Cube

There are three color coordinates (red, green & blue). This creates a three-dimensional color space — a “color cube”. In theory, a color can have any coordinate value within the cube. In practice, the hardware and software both limit the number of possible values for each coordinate.

The “legal” web color palette allows only six values for each color coordinate: zero, full-on plus four equally spaced points between. The maximum value is 255 (FF in hex); the intermediate values are (in hex): 33, 66, 99 & CC. (And “zero,” of course, is 00.)

The result is a 6x6x6 color cube containing 216 distinct colors. These are the “legal” (according to Netscape in the early days of the web) colors browsers must support. (There was also a set of legal color names browsers had to accept.)

Below is a visualization of the legal web color cube with the vertical layers exploded to show all six slices through the cube. Each slice shows the 36 colors that result from mixing the blue and green coordinates in all possible legal ways. The vertical axis is the red coordinate, so each slice represents a given value for red (of the six legally available).

[Color Cube exploded] [Red color planes]

(The six color planes are shown laid out flat on the right.)