C o l o r Representation on the Computer
RGB Components


The computer represents all colors as the combination of just three colors:

red, green, and blue (RGB) components.

These 3 colors are generated by three electron guns in your monitor hitting colored phosphor dots. Each pixel contains a red, a blue, and a green phosphor dot. Each gun is assigned a particular color. If all three guns hit their associated phosphor dot in a given pixel, then that pixel will look white.

There are a number of different methods for storing these RGB values. One of the most common is called true color. In true color, a single color value is stored in 32 bits (4 bytes). The first byte (8 bits) represents the red, the next byte represents the green, and the third byte is blue. The last byte is sometimes used for representing the transparency (alpha).

1 byte or 8 bits provides 28=256 possible values. Thus each RGB component can take on values from 0 to 255. The total number of colors that can be represented is (256)3 which is roughly 16 million!

Often in Web design one sees colors given by hexadecimal numbers. These are just the value of the above 4-byte RGB color given in hexadecimal.

One can get a feel for these colors by going to the menus control panels; display; appearance; color, where you will see the panel:

Each RGB value also corresponds to a Hue, Saturation, and Luminance:


[top]

[Understanding Color]

[Home Page]