Color depth

The color depth determines an essential feature of raster and vector graphics term describing the number of all the brightness and color values ​​.


The color and brightness of digital images are stored within the smallest unit of each image: in raster graphics within each pixel, for vector graphics within each color defined vector. Each imaging unit contains a fixed maximum number of gradations ( for example, when the average digital photo: 256 levels per color channel of a pixel ) and the concrete color and brightness information ( on the scale of these specified gradations ).

The number of possible gradations is not necessarily synonymous with the number of possible colors. There is a difference on the number of color channels or the extent of the color table. Only the context of the nature of the color definition ( and the number of color channels, tables, ...) and an indication of the steps (in bits) results in the maximum possible color depth.


The maximum possible amount of ( bpp) is specified in bits and thus names the color depth of an image. These graduations are a scale on which the actual color information is stored. Thus, the color depth is the mathematical basis of the actual color information. In practice, an image has never the amount of colors that represents the volume of the scale (color depth ) is available.

A color depth of 1 bit would mean that in each one color channel ( on the computer screen usually red, green and blue) exactly two states would be possible. As an example it would mean for the color channel red then black and red. At a color depth of 2 bit 4 states would be possible, so for example, black, dark red, medium red and light red. The common color depth of 8 bits 28 = 256 states and thus as many individual red tones are possible.

Most common is the RGB color space with 8 bits per channel, according to (28 ) 3 = 16,777,216 ( approximately 16.7 million ) theoretically possible colors. In 16 bit (per channel) this results 281.474.976.710.656 ( 281 trillion ) color options.

Color tables

Indexed color images are a special type is: among them, the data structure of a pixel does not contain the color itself, but an index to an entry in the color table. Instead of a color table one also talks often of a color palette. The depth of color thus indicates the maximum number of usable entries in the color table. Practically color tables with 1 to 8 bpp are ( = bit per pixel ) is used, corresponding to 21 = 2 to 28 = 256 simultaneously coded or displayable colors. 1 bpp for images that contain only black and white, common.


  • The GIF format allows 1 to 8 bpp.
  • PNGs with color table allow 1, 2, 4 or 8 bpp.
  • The EGA graphics standard allows 4 bpp.


Digital photos usually have a color depth of 24 bit. In practice, there is of course no photo that really has all single colors - the average is much lower. The advantage of 24 -bit color depth is still at almost any photo clearly to bear, as can be seen from a comparison with a 16 -bit version of the same photo. The photo with 16- bit color depth is apparent, often very disturbing pattern podium at color transitions that are no longer visible at 24 -bit color depth. The advantage of the higher color depth is less so in the maximum number of possible colors, but rather in the larger color differentiation.

Most computer monitors can only display 8 bits per channel. In professional photography and for medical applications and 16 bits per channel are needed. Extreme brightness ranges ( deep black shadows and bright light ) can not be stored with 8 bits. For this purpose, a drastic reduction of the contrast range and the contrast differentiation is necessary. To make this change the dynamic range of visually appealing, find high dynamic range image ( high contrast images ) application that can be scaled down by tone-mapping method for displaying to 8 bits. This method is a special form of image optimization.

In the scan, cinema, television and print area even more color depths of 30, 32, 36, 40 and 48 bits are common, sometimes even in the internal processing ( d h.beispielsweise the hardware is a scanner internally with 30 bits to read a document, the scanner is then but to the computer finished the scanned image with 24 bit color depth ).