Understanding how colors are implemented can assist in understanding how the color and mix attributes work.

The pel is the smallest element of the display screen that can be addressed. For monochrome displays, pels are either turned off or turned on. For color displays, each pel contains a red, green, and blue section, each of which is called a phosphor.

The display has color guns of red, blue, and green light that illuminate the phosphors in a single pel. By switching these color guns on and off in different combinations, eight standard colors can be produced. By varying the intensities of the color guns, additional colors can be produced. The following table shows the eight standard colors that can be generated from the three color guns.

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³Pel appears... ³Red            ³Green          ³Blue           ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³Red            ³ON             ³OFF            ³OFF            ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³Green          ³OFF            ³ON             ³OFF            ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³Blue           ³OFF            ³OFF            ³ON             ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³White          ³ON             ³ON             ³ON             ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³Black          ³OFF            ³OFF            ³OFF            ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³Cyan           ³OFF            ³ON             ³ON             ³
³(Turquoise)    ³               ³               ³               ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³Pink           ³ON             ³OFF            ³ON             ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³Yellow         ³ON             ³ON             ³OFF            ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

Each pel is described internally by a number of bits of storage. In a monochrome display, only one bit per pel is required, and that bit is either on or off. In an eight-color system, three bits per pel are necessary. Each of those three bits records the on or off setting of one color gun.

To be able to control the intensity of a color and obtain more than eight colors, more than three bits per pel are needed. For example, six bits per pel provide 32 different combinations.

The wider the range of available colors, the more bits per pel required for each color. This storage issue is resolved by keeping a wide choice of colors but restricting the number of colors available at any given time. Applications define the colors that they want to use in a logical color table. Selecting a color defined in the logical color table produces the nearest available color in the hardware palette.


[Back] [Next]