Web Page Color Palettes

Both the Netscape Navigator and Microsoft Internet Explorer "safe palettes" are based on a simplified version of the color cube. The traditional 24-bit RGB color cube is based on mixing the colors red, green, and blue in varying values from 0 to 255. So, black would be represented by 0, 0, 0 – no red, no green, and no blue – while white would be represented by 255, 255, 255 – 100% red, 100% green, and 100% blue. This method results in 16,777,216 colors which are represented by 24-bits of data: three 8-bit bytes.

The simplified color cubes of Netscape Navigator and Microsoft Internet Explorer are based on the same idea, but using a much smaller scale. Instead of 256 values, only 6 values are used. These correspond to the normal color cube values of 0, 51, 102, 153, 204, and 255. Instead of resulting in the enormous 16,777,216 colors, this method results in a mere 216 colors, which conveniently (and intentionally) fits within the 256 colors of an 8-bit color system.

Below are a number of charts showing the colors in the 216-color palette, as well as how they degrade to the 16-color standard VGA palette. To find the RGB color set for a given color, begin by referring to the title at the top of the chart it appears in. This title will be something like "#FF(Left)(Top)". This indicates that the colors in this chart begin with the hexadecimal value of "#FF". To find the remaining values for the color, find the number at the left of the row that the color appears in and the number at the top of the column that the color appears in.

Undegraded, 8-bit (256) color Degraded, 4-bit (16) color
#00(Left)(Top)
  00 33 66 99 CC FF
00            
33            
66            
99            
CC            
FF            
#00(Left)(Top)
  00 33 66 99 CC FF
00            
33            
66            
99            
CC            
FF            
#33(Left)(Top)
  00 33 66 99 CC FF
00            
33            
66            
99            
CC            
FF            
#33(Left)(Top)
  00 33 66 99 CC FF
00            
33            
66            
99            
CC            
FF            
#66(Left)(Top)
  00 33 66 99 CC FF
00            
33            
66            
99            
CC            
FF            
#66(Left)(Top)
  00 33 66 99 CC FF
00            
33            
66            
99            
CC            
FF            
#99(Left)(Top)
  00 33 66 99 CC FF
00            
33            
66            
99            
CC            
FF            
#99(Left)(Top)
  00 33 66 99 CC FF
00            
33            
66            
99            
CC            
FF            
#CC(Left)(Top)
  00 33 66 99 CC FF
00            
33            
66            
99            
CC            
FF            
#CC(Left)(Top)
  00 33 66 99 CC FF
00            
33            
66            
99            
CC            
FF            
#FF(Left)(Top)
  00 33 66 99 CC FF
00            
33            
66            
99            
CC            
FF            
#FF(Left)(Top)
  00 33 66 99 CC FF
00            
33            
66            
99            
CC            
FF            

By selecting colors from the tables above for large areas of color on a web page – graphics or backgrounds – you can ensure that the colors will not appear incorrectly or dithered when displayed by a variety of browsers. For further discussion of these palettes and how they degrade, see my page about Web Page Color Degradation.


This page is copyright © 2024 by Donovan K. Loucks (Home Page / E-mail)