The methods used to present colors within personal computers are a mixture of color theory, electronic component technology, cost, software expedience, and designer preferences.
While modern cathode ray tubes (CRTs) can present an infinite variety of colors, the specific colors to be shown are stored in digital indexes within the computer's main and/or display memory. This implies that the variety of colors actually employed will be limited to the maximum size of the memory cells allocated for each color. The number of colors which can be displayed is often further limited by the common technique of providing a small array of such colors (the "Palette").
| Pixel
Value |
points to --> | Palette | points to --> | RGB Color
Coördinates |
The RGB (red, green, blue) Color Coördinates are given in terms of a value for each color component in the RGB system. Normally, they have an equal number of possible values, and that range for each component is determined by the number of bits allocated for each. Most systems use an equal number of bits (and hence an equal range of values) for R, G, and B, though there are systems which use unequal numbers of bits (e.g., 3-3-2). These values are stored in the Palette. The combined RGB bit width stored in the Palette is usually a convenient multiple of 2, typically 224 = 16,777,216.
In turn, however, the width of the Pixel Value is normally much smaller, typically 3, 4, or 8 bits wide, thereby limiting the number of possible Palette values which are actually employed. For 3, 4, and 8 bits, for example, the number of values would be 8 (= 23), 16 (= 24), and 256 (= 28), respectively.
The following table summarizes these constraints.
| Each RGB Component |
Potential Colors |
Next Largest Power of 2 |
Increments | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Fraction | % | 8-bit | 16-bit | ||||||
| Bits | Values | Dec | Hex | Dec | Hex | ||||
| 1 | 2 = 21 | 8 = 23 | 8 = 23 | 1 | 100.0 | 255 | FF | 65535 | FFFF |
| 2 | 3 | 27 = 33 | 32 = 25 | 1/2 | 50.0 | 128 | 80 | 32896 | 8080 |
| 4 = 22 | 64 = 43 | 64 = 26 | 1/3 | 33.3 | 85 | 55 | 21845 | 5555 | |
| 3 | 5 | 125 = 53 | 128 = 27 | 1/4 | 25.0 | 64 | 40 | 16448 | 4040 |
| 6 | 216 = 63 | 256 = 28 | 1/5 | 20.0 | 51 | 33 | 13107 | 3333 | |
| 7 | 343 = 73 | 512 = 29 | 1/6 | 16.7 | 43 | 2B | 11051 | 2B2B | |
| 8 = 23 | 512 = 83 | 512 = 29 | 1/7 | 14.3 | 36 | 24 | 9252 | 2424 | |
| 4 | 16 = 24 | 4,096 = 163 | 4,096 = 212 | 1/15 | 6.7 | 17 | 11 | 4369 | 1111 |
| 5 | 32 = 25 | 32,768 = 323 | 32,768 = 215 | 1/31 | 3.2 | 8 | 08 | 2056 | 0808 |
| 6 | 64 = 26 | 262,144 = 643 | 262,144 = 218 | 1/63 | 1.6 | 4 | 04 | 1028 | 0404 |
| 7 | 128 = 27 | 2,097,152 = 1283 | 2,097,152 = 221 | 1/127 | 0.8 | 2 | 02 | 514 | 0202 |
| 8 | 256 = 28 | 16,777,216 = 2563 | 16,777,216 = 224 | 1/255 | 0.4 | 1 | 01 | 257 | 0101 |
This page and its contents are copyright