Integer Colors

Colors are specified using three numbers in the form R G B where each number defines the amount of red (R), green (G) and blue (B) in a color. The valid numbers are from 0 to 255 inclusive which gives a total of 256 different values.

Below is a table showing 216 example colors and their decimal notations:

0 0 0 0 0 51 0 0 102 0 0 153 0 0 204 0 0 255
0 51 0 0 51 51 0 51 102 0 51 153 0 51 204 0 51 255
0 102 0 0 102 51 0 102 102 0 102 153 0 102 204 0 102 255
0 153 0 0 153 51 0 153 102 0 153 153 0 153 204 0 153 255
0 204 0 0 204 51 0 204 102 0 204 153 0 204 204 0 204 255
0 255 0 0 255 51 0 255 102 0 255 153 0 255 204 0 255 255
51 0 0 51 0 51 51 0 102 51 0 153 51 0 204 51 0 255
51 51 0 51 51 51 51 51 102 51 51 153 51 51 204 51 51 255
51 102 0 51 102 51 51 102 102 51 102 153 51 102 204 51 102 255
51 153 0 51 153 51 51 153 102 51 153 153 51 153 204 51 153 255
51 204 0 51 204 51 51 204 102 51 204 153 51 204 204 51 204 255
51 255 0 51 255 51 51 255 102 51 255 153 51 255 204 51 255 255
102 0 0 102 0 51 102 0 102 102 0 153 102 0 204 102 0 255
102 51 0 102 51 51 102 51 102 102 51 153 102 51 204 102 51 255
102 102 0 102 102 51 102 102 102 102 102 153 102 102 204 102 102 255
102 153 0 102 153 51 102 153 102 102 153 153 102 153 204 102 153 255
102 204 0 102 204 51 102 204 102 102 204 153 102 204 204 102 204 255
102 255 0 102 255 51 102 255 102 102 255 153 102 255 204 102 255 255
153 0 0 153 0 51 153 0 102 153 0 153 153 0 204 153 0 255
153 51 0 153 51 51 153 51 102 153 51 153 153 51 204 153 51 255
153 102 0 153 102 51 153 102 102 153 102 153 153 102 204 153 102 255
153 153 0 153 153 51 153 153 102 153 153 153 153 153 204 153 153 255
153 204 0 153 204 51 153 204 102 153 204 153 153 204 204 153 204 255
153 255 0 153 255 51 153 255 102 153 255 153 153 255 204 153 255 255
204 0 0 204 0 51 204 0 102 204 0 153 204 0 204 204 0 255
204 51 0 204 51 51 204 51 102 204 51 153 204 51 204 204 51 255
204 102 0 204 102 51 204 102 102 204 102 153 204 102 204 204 102 255
204 153 0 204 153 51 204 153 102 204 153 153 204 153 204 204 153 255
204 204 0 204 204 51 204 204 102 204 204 153 204 204 204 204 204 255
204 255 0 204 255 51 204 255 102 204 255 153 204 255 204 204 255 255
255 0 0 255 0 51 255 0 102 255 0 153 255 0 204 255 0 255
255 51 0 255 51 51 255 51 102 255 51 153 255 51 204 255 51 255
255 102 0 255 102 51 255 102 102 255 102 153 255 102 204 255 102 255
255 153 0 255 153 51 255 153 102 255 153 153 255 153 204 255 153 255
255 204 0 255 204 51 255 204 102 255 204 153 255 204 204 255 204 255
255 255 0 255 255 51 255 255 102 255 255 153 255 255 204 255 255 255

NB The above table contains what is known as the "web safe" color palette, it is also known by the following names: browser-safe palette, Netscape palette, 216 color palette, Web palette or 6x6x6 color cube.

Historical note: It's purpose was to provide a consistent palette of colors for a wide variety of browsers and operating systems which at the time usually had 256 colors (8-bit).

The reason that 216 colors were used out of the possible palette of 256 colors is that this allowed an even sampling of color throughout the color space that can be realised on most displays by dividing it up into areas which represent one-sixth of the possible values of all color components of red, green and blue - hence we get a cube which has 6 possible areas of red, 6 of green and 6 of blue which together make up 6x6x6 = 216 combinations.

Today most screens are viewed in True color which uses 24-bits and uses the full range of 256 possible values for each red, green and blue color component which give 256x256x256 = 16777216 colors.

However, this can be quite daunting for non-artists to work with and the web safe palette is a useful starting point when considering color schemes.