In color reproduction, including computer graphics and photography, the gamut, or color gamut (pronounced /ˈgæmət/), is a certain complete subset of colors. The most common usage refers to the subset of colors which can be accurately represented in a given circumstance, such as within a given color space or by a certain output device. Another sense, less frequently used but not less correct, refers to the complete set of colors found within an image at a given time. In this context, digitizing a photograph, converting a digitized image to a different color space, or outputting it to a given medium using a certain output device generally alters its gamut, in the sense that some of the colors in the original are lost in the process.
The term gamut was adopted from the music field, where it meant the set of pitches of which musical melodies were composed; Shakespeare's use of the term in The Taming of the Shrew is sometimes attributed to another author/musician, Thomas Morley. In the 1850s, the term was being applied to a range of colors or hue, for example by Thomas De Quincey who wrote, "Porphyry, I have heard, runs through as large a gamut of hues as marble.
In color theory, the gamut of a device or process is that portion of the color space that can be represented, or reproduced. Generally, the color gamut is specified in the hue–saturation plane, as many systems can produce colors with a wide range intensity within their color gamut; in addition, for subtractive color systems, such as printing, the range of intensity available in the system is for the most part meaningless outside the context of its illumination.
When certain colors cannot be displayed within a particular color model, those colors are said to be out of gamut. For example, pure red which is contained in the RGB color model gamut is out of gamut in the CMYK model.
A device that is able to reproduce the entire visible color space is somewhat of a holy grail in the engineering of color displays and printing processes. While modern techniques allow increasingly good approximations, the complexity of these systems often makes them impractical. What is "good enough" is dictated by the limitations of human perception. While processing a digital image, the most convenient color model used is the RGB model. Printing the image requires transforming the image from the original RGB color space to the printer's CMYK color space. During this process, the colors from the RGB which are out of gamut must be somehow converted to approximate values within the CMYK space gamut. Simply trimming only the colors which are out of gamut to the closest colors in the destination space would burn the image. There are several algorithms approximating this transformation, but none of them can be truly perfect, since those colors are simply out of the target device's capabilities. This is why identifying the colors in an image which are out of gamut in the target color space as soon as possible during processing is critical for the quality of the final product.
Gamuts are commonly represented as areas in the CIE 1931 chromaticity diagram as shown at right, with the curved edge representing the monochromatic colors. Gamut areas typically have triangular shapes because most color reproduction is done with three primaries.
However, the accessible gamut depends on the brightness; a full gamut must therefore be represented in 3D space, as below:
The axes in these diagrams are the responses of the short-wavelength (S), middle-wavelength (M), and long-wavelength (L) cones in the human eye. The other letters indicate black (Blk), red (R), green (G), blue (B), cyan (C), magenta (M), yellow (Y), and white colors (W). (Note: These pictures are not exactly to scale.)
The left diagram shows that the shape of the RGB gamut is a triangle between red, green, and blue at lower luminosities; a triangle between cyan, magenta, and yellow at higher luminosities, and a single white point at maximum luminosity. The exact positions of the apexes depends on the emission spectra of the phosphors in the computer monitor, and on the ratio between the maximum luminosities of the three phosphors (i.e., the color balance).
The gamut of the CMYK color space is, ideally, approximately the same as that for RGB, with slightly different apexes, depending on both the exact properties of the dyes and the light source. In practice, due to the way raster-printed colors interact with each other and the paper and due to their non-ideal absorption spectra, the gamut is smaller and has rounded corners.
The gamut of reflective colors in nature has a similar, though more rounded, shape. An object that reflects only a narrow band of wavelengths will have a color close to the edge of the CIE diagram, but it will have a very low luminosity at the same time. At higher luminosities, the accessible area in the CIE diagram becomes smaller and smaller, up to a single point of white, where all wavelengths are reflected exactly 100 per cent. The exact coordinates of white are of course determined by the color of the light source.
In the beginning of the 20th century industrial demands for a controllable way to describe colors and the new possibility to measure light spectra initiated intense research on mathematical descriptions of colors. The idea of optimal colors was introduced by the Baltic German Chemist Wilhelm Ostwald. Erwin Schrödinger showed in his 1919 article Theorie der Pigmente von größter Leuchtkraft (Theory of Pigments with Highest Luminosity) that the most-saturated colors are generated by stimuli having either a zero or full reflectance over the visible spectrum. (i.e., the reflectivity spectrum must have at most two transitions). Thus two types of optimal color spectra are possible: Either the transition goes from zero at both ends of the spectrum to one in the middle, as shown in the image, or it goes from one at the ends to zero in the middle. The first type produces colors that are similar to the spectral colors and follow roughly the horseshoe-shaped portion of the CIE xy chromaticity diagram. The second type produces colors that are similar to the colors near the straight line in the CIE xy chromaticity diagram, leading to magenta-like colors. Schrödinger's work was further developed by David MacAdam and Siegfried Rösch. MacAdam was the first person to calculate precise coordinates of selected points on the boundary of the optimal color solid in the CIE 1931 color space for lightness levels from Y = 10 to 95 in steps of 10 units. This enabled him to draw the optimal color solid at an acceptable degree of precision. Because of his achievement the boundary of the optimal color solid is called the MacAdam limit. Today efficient algorithms can calculate the boundary to a much higher degree of precision (several hundred points per lightness level compared to MacAdam's maximum of twelve points per level) in an acceptable amount of time (an hour on a modern computer). The MacAdam limit, on which the most saturated (or "optimal") colors reside, shows that colors that are near monochromatic colors can only be achieved at very low luminance levels, except for yellows, because a mixture of the wavelengths from the long straight-line portion of the spectral locus between green and red will combine to make a color very close to a monochromatic yellow.
Systems which use additive color processes usually have a color gamut which is roughly a convex polygon in the hue-saturation plane. The vertices of the polygon are the most saturated colors the system can produce. In subtractive color systems, the color gamut is more often an irregular region.
Following is a list of representative color systems more or less ordered from large to small color gamut: