Gamut
In computer graphics, the gamut 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.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.
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 below, with the curved edge representing the monochromatic colors. These areas typically have triangular shapes.
However, the accessible gamut depends on the brightness; a full gamut must therefore be represented in 3D space, as below:
The pictures below 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 diagram above, with the added dimension of brightness.
The axes in these diagrams are the responses of the short-wavelength, middle-wavelength, and long-wavelength 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 on 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.Representation of gamuts

