Color PalettesA color palette is the set of colors from which a bitmap is composed. Technically, it defines the mapping from the numbers in the bitmap to the colors of the pixels on the screen. Ideally, of course, there should be a continuum of color values encompassing every possible color in nature. However, the computer would therefore have to assign each of these infinite colors an individual number, so that it could represent them internally, which would require either a continuous domain representation, or the entire set of integers. This cannot be done because the modern digital computer cannot represent an infinite number of values.
To understand some of the terminology used in the description of color palettes, it is necessary to have a basic understanding of the binary number system used to store data in a computer's memory. If you need a quick introduction to binary numbers, click here.
Color Depths and the Uniform Discrete PaletteIn computer graphics, we can choose to represent the color spectrum by a uniform distribution of color intervals. Thus, each subsequent, discrete color value represents a color interval that is shifted a uniform amount to the higher end of the spectrum from its neighbor, and is the same width as its neighbor. The number of colors in this type of scheme is referred to as the color depth of the palette. The color depth is usually denoted by the number of bits needed to represent a single color in the palette. The following is a table of typical color depths:
The color depth of an image should be chosen such that the picture is displayed with sufficient, but not excessive color detail. For example, it would be redundant to use a 24-bit color depth to represent a black and white image. This would, in fact, require 24 times as much space to store the raw data than if the image had been stored in a 1-bit color depth. Similarly, a photo-quality image, with many smooth gradients from one color to another, would look very inadequate in 1-bit color. You would only require 1/24th of the space, but the picture would not be worth looking at. 24-bit color is often called True Color because it can represent color values to approximately the same color resolution depth as the human eye.
Picked Palette - the Non-Uniform Discrete Palette
The drawback of this method is that the specific palette of the image must be included with the image file. The 'palette' section of these image files references a non-uniform discrete palette entry to a uniform discrete palette entry. By referencing the picked palette to the uniform discrete palette, the computer knows exactly which colors to use in the image. This is obviously necessary, since not all picked palette images will 'pick' the same palette. The picked palette scheme is a discrete palette, which picks its colors from a larger, uniform discrete palette.
Contents | Previous - Pixel Graphics | Next - Image Compression Formats |