A certain complete subset of colors
In color reproduction, including computer graphics and photography, the gamut, or color gamut /ˈɡæ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 still 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 field of music, where in middle age Latin "gamut" meant the entire range of musical notes of which musical melodies are composed; Shakespeare's use of the term in The Taming of the Shrew is sometimes attributed to the author/musician Thomas Morley. In the 1850s, the term was 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 a system can usually produce colors over a wide intensity range within its color gamut; for a subtractive color system (such as used in printing), the range of intensity available in the system is for the most part meaningless without considering system-specific properties (such as the illumination of the ink).
When certain colors cannot be expressed within a particular color model, those colors are said to be out of gamut.
A device that can reproduce the entire visible color space is an unrealized goal within the engineering of color displays and printing processes. Modern techniques allow increasingly good approximations, but the complexity of these systems often makes them impractical.
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, with the curved edge representing the monochromatic (single-wavelength) or spectral colors.
The accessible gamut depends on the brightness; a full gamut must therefore be represented in 3D space.
The pictures show the gamuts of RGB color space (left), such as on computer monitors, and of reflective colors in nature (right). The cone drawn in grey corresponds roughly to the CIE chromaticity diagram, with the added dimension of brightness.
The axes in these diagrams are the responses of the SML cones in the human eye. The other letters indicate black, red, green, blue, cyan, magenta, yellow, and white colors. (Note: These pictures are not exactly to scale.)
The right 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.