What is a color gamut

## What is a color gamut

Color gamut is the color pallete that a given technology or process is capable of reproducing. A fact unknown by the layman is that every technology (color TV, color printer, etc.) has severe limitations in color reproduction.

That's why we can discriminate between natural and artificial images at a glance — e.g. what you see through an open window versus a picture or a TV screen mounted in the window's frame. And we can tell apart an analog TV, a digital TV, a printed picture, etc. because every media has a different 'look' regardless of resolution.

In order to understand gamut, it is important to understand the CIE diagram (Figure 1). It is the result of extensive research about human vision. It is also known as the "horseshoe diagram", and its funny shape will be explained soon.

Figure 1: CIE diagram (Source: Wikipedia)

The upper curve delimiting the shape, that resembles a horseshoe, is related to pure colors — the ones we can see in a rainbow. The colors spot-on this curve are the only ones that actually exist in nature. The blue numbers are the wavelengths of each color. For example, red has a wavelength of 620nm or 0.000620mm. For comparision, a microwave radio signal has wavelengths between 30cm and 3mm.

Only lasers can generate the pure colors at the borders of the diagram. Mundane technologies always add small amounts of other colors. This limitation has important consequences, as we will see. In particular the violets (bottom left corner) are very difficult to generate in the purest form.

The bottom edge of the diagram, a straight line, is called the "magenta line". These colors between violet and red are not rainbow colors. When our eyes are stimulated by a mixture of blue and red, or violet and red, then we "see" colors like purple, magenta or pink.

The colors in the bulk of CIE diagram are "less pure" than colors at the edges. Near the center, the colors are very pastel. The white color has its spot in the center, since white is a perfectly balanced mix of all rainbow colors.

The white color is the limit case. Mixtures that are almost but not quite balanced will look like pastel colors, but still have a discernible shade (e.g. pastel red).

Now, a demonstration of how the CIE diagram format aids the "calculation" of a color mix. Figure 2 illustrates a mix of red and green.

Figure 2: Mix of red and green, seen as yellow

In Figure 2, we draw a line between the two exact tones involved in the mix (a shade of red and a shade of green). When these two colors reach the eyes, we cannot see them individually: we see the middleway color, a shade of yellow.

If we mix these colors in different proportions, the apparent color still belongs to this line, but the share will be nearer to the stronger color. For example, a mix with 75% red would render a shade of orange (a quarter way between red and green).

We can even determine the result of three-color or n-color mixes. If three colors are involved, draw a triangle and find the center of it. The mix will look like the color on this center point.

This is the strength of the CIE diagram: it allows to determine any color mix with a simple interpolation. The strange shape format and the color distribuition within the shape serve to this purpose: calculate mixes using simple straight lines.

Two details must be observed. First, the CIE diagram is valid only for human vision. For example, birds have four color receptors, and their subjective sensations to color mixes are certainly different, implying a very different CIE curve.

Second, the CIE diagram assumes additive mix, that is, combination of colored lights, not a mix of pigments. If you mix red and green paints, you won't get yellow; you get a murky brown-violet color, because red paint is not red; it is a substance that absorbs non-red colors. Mixing paints is mixing two color filters, and the result is an even more restrictive color filter.

### Color standards for the mass market

Since the human vision has three color receptors, and the CIE diagram format is roughly triangular, the most popular color reproduction methods also employ three primary colors. Two colors is too little (even though the first color movies actually used two colors, with interesting results). Four colors or more is expensive and would not yield major gains.

Figure 3 shows the gamut of sRGB standard. It is employed in most computer monitors, digital TVs, movie and still cameras, etc. The triangle inside the diagram shows the colors that sRGB can reproduce; the arc curve represents color temperatures, a subject that we won't discuss here.

Figure 3: sRGB gamut. Source: Wikipedia

First thing that we note in Figure 3 is, the triangle vertices (tips) that represent the purest colors employed in an sRGB monitor, are not in the edge of the CIE diagram, so they are not 100% pure as one would expect. This choice of impure primary colors shrinks the gamut area. In particular, the green tip is very distant from the edge, so sRGB primary green is very impure. Why's that?

The reason is: generating pure colors is expensive. The screen "phosphors" cannot produce 100% pure reds, greens or blues. Green is the most problematic color. As we can see, the gamut of any given technology involves many decisions, including cost and mass production viability.

In practice, the sRGB gamut is not such a crippling limitation. Even though the blue vertex in gamut does not reach violet, an sRGB screen still can show shades of violet. The only thing is, violets on the screen won't look as saturated as e.g. violet flowers found in nature. (I have mentioned violet because it is a difficult color; lots of cameras get the colors wrong when taking pictures of violet flowers.)

The same happens with other colors not covered by the sRGB gamut. It can show shades of yellow, cyan, aquamarine, etc. The only issue is, these sRGB colors won't be as vibrant as real-world ones. On the other hand, the gamut's red and blue vertices are near the CIE edge, so the shades of red and blue do look pretty good on screen.

Not that other technologies don't try to cover more colors. Figure 4 shows the gamut of many of them.

Figure 4: Gamut of several technologies. Source: Wikipedia

Photography entusiasts are divided between sRGB and Adobe RGB, more or less like Democrats and Republicans. Good digital cameras can do Adobe RGB, but then the photographer also needs to have a screen capable of Adobe RGB gamut, otherwise edits will throw colors off-beam.

Of course, the idea of Adobe RGB is to get a better gamut at the last step: printing. Amateur photographers need to check if the print service "understands" Adobe RGB (not always the case). Naturally, big-time book and magazine publishers have the necessary equipment to use Adobe RGB end-to-end.

Figure 5 shows a cyan-green sRGB gradient. Clicking or touching the image toggles between Adobe RGB and sRGB versions. Both images are exactly the same, only the color profile is different.

Figure 5: sRGB and Adobe RGB gradients. Click or touch the image to toggle between them.

You will only see a difference if the screen and the browser and the operating system support Adobe RGB. For example, I could see a difference in Safari for Mac, but not in Chrome for Mac. You can try to download both images and compare them using other software. Still talking about Macs, Preview and iPhoto show differences, but not Gimp. I was actually surprised to see any differences in my monitor since it is not a "pro" model.

On the other hand, the sRGB image on Chrome shows the same vibrant green of the Adobe RGB image in Safari. While Safari obeys the strict limits of sRGB, Chrome (and most other software, as well as all mobile devices) shows the most vibrant colors available. An explicit conversion from Adobe RGB to sRGB could generate bland images on the end user's screen.

In order to stress the point, there goes another example: a yellow furniture. Saturated yellow is another color that Adobe RGB can show, and sRGB cannot. I took two pictures of the same object, one with Adobe RGB configured in-camera, another one sRGB. The following images are the original camera files:

Figure 6: Yellow furniture, Adobe RGB

Figure 7: Yellow furniture, sRGB

In Safari or Preview, Figure 7 shows a dull yellow that does not make justice to the actual object. This is expected due to sRGB limitations. But in Chrome and iPhone 5, Figure 6 shows a greenish yellow, while Figure 7 looks ok.

Then, I took a number of screenshots, to try to illustrate how these pictures can look different according to color profile and viewing software. Since a screenshot captures the "native" pixel values post-monitor calibration, Figures 8 and 9 may present weird colors in your screen.

Figure 8: Screenshot of Adobe RGB image in Preview

Figure 9: Screenshot of sRGB image in Preview

Figure 10: Screenshot of Adobe RGB image in Chrome

Figure 11: Screenshot of sRGB image in Chrome

On my monitor, Figure 8 looks best. This is expected since everything conjures up for this result. But Figure 11 looks pretty good, too. In iPhone 5, Figure 11 is definitively the best. In a Galaxy Nexus, Figure 9 looks most faithful.

These technology blunders justify the pragmatic advice of using only sRGB when the destination of your pictures is the Web or a screen.

### Even more colors!

It is also worth of mention the Wide Gamut RGB system, also created by Adobe. This system specifies pure primary colors, creating an enormous gamut. As we said before, pure colors are difficult to generate, but the techological evolution will solve this problem in time. For example, OLED screens already have wider gamut than LCDs. (By now, the biggest issue with OLEDs is being too expensive for big screens.)

Due to the CIE diagram format, that just reflects how the human vision works, even using four, five or more primary colors is not enough to cover 100% of color spectra, since the gamut is always a polygon, and a polygon can't fill a curved shape. Of course, using more colors does increase the gamut and new technologies try this way from time to time.

This article describes Wide Gamut in the context of 4K TVs and other related features like 10-bit color resolution.

### Impossible colors

The ProPhoto gamut, also present in Figure 4, adopts a funny strategy to increase gamut: only three primary colors, but two of them are "imaginary colors", that a normal human being cannot see. It employs a super-blue and a super-green.

What are those "imaginary colors"? They are colors with saturation higher than we can normally perceive.

The color receptors in our eyes are not perfect either, and they are a bit stimulated by the opposite colors as well. For example, the green receptors are slightly sensitive to violet, they register some light even if we look to a violet monochromatic laser. So, we perceive that pure violet with 99.9% of purity, but never 100%.

But an artificial sensor, like a camera, can see colors better than a human, so it can define its own gamut based on the most pure primary colors that it can distinguish.

The only problem is, the reproduction of these "imaginary colors" wouldn't be seen by anybody. A printed super-blue looks just like ordinary blue. But that's ok. The idea of using super-primary-colors is to cover more of those saturated secondary colors that are visible, like saturated cyans and yellows.

There is a trick to see a "super color". For example, to see a super-green, cover your entire screen with magenta (using any means, like Paint or Photoshop) and make another full-screen image that is green. Keep looking at the magenta image for two minutes, then switch fast to the green image. Since the red and blue receptors were "worn off" by the magenta, they will black out and you will see a green that is more saturated (pure) than usual.

The same trick can be employed to see saturated shades of yellow and cyan that normally cannot be reproduced by an sRGB monitor.

### The big problem: color printing

The CMYK printing technology, present in books, magazines, printers, etc. has the best cost-benefit relationship. But CMYK is very limited in gamut. It surpasses sRGB only in saturated cyan and yellow, since these are primary CMYK colors. Reds, greens and blues look somewhat dull in CMYK.

Subtrative color mix is, by itself, a problem for gamut. Likewise the primary sRGB colors, CMYK pigments are not perfect. The purest and more exact a pigment, the more expensive it is. Just look at the price of a typical inkjet printer cartridge.

To achieve a wider print gamut, the solution is to use more primary pigments. The Hexachrome system adds green and orange to CMYK. The Pantone color pallete, widely used as authoritative color reference for everything, including national flags, employs no less than 14 different pigments.

Photographic film (now obsolete) and paper have the reputation of delivering wider gamut than current digital technologies. In particular, the slide film has great saturated colors.

It is interesting to note that films also employ subtractive mix of three colors. Probably, two details of the processing compensate this limitation. First, a film is "read" by transparency, while in a print the light must cross the pigments twice and be reflected by the paper. Second detail is that every batch of film or photographic paper is tested and compensated for color correction, so any small deviation in pigments is compensated for.

A residual problem in photographic film is the loss of gamut space when they are scanned, since the scanner will have its own gamut limitations (it can be sRGB-only). This will rob some of the original colors.

### Violet

I have mentioned that violet is a "difficult" color. Many digital cameras, at least the older ones, struggle with reproduction of certain tones of "purple". You probably had taken a picture of a purple flower and it looks blue on-screen.

First thing is, we tend to name "purple" a range of colors that are spectrally very different, like violet, purple, pink, magenta, rose, lavender, etc. Violet is a true color, it lies between blue and ultraviolet. The other colors are mixtures of violet and red, or blue and red, that our brain recognizes as sui generis colors.

To make things more complicated, our eyes can be "fooled" by a mix of dark blue and a little bit of red. This mix looks violet, though less saturated than the spectral violet. So, when we see a violet-like object, it is impossible to tell whether it is really violet or blue+red. (We can know for sure by using a red light; if the object is truly violet, it will look almost black under red light.)

Every color technology reproduces magenta or pink without issues; it is just a matter of mixing red and blue in correct proportion. The same happens for non-saturated violets like lavender. The most saturated the desired violet, the more difficult is to reproduce it, at least with standard equipment.

A way to extend RGB technology into violets (and increase its gamut) is to use violet as the "B" primary color. That's what the Wide Gamut RGB does. In this system, blue is generated by a mix of violet and green. Three practical issues: violet dyes and light sources are more expensive; the human eye is poorly sensitive to violet, so more power is necessary to achieve the same apparent brightness; and intense violet light can damage the eye (not only UV, but also strong violet and blue light are bad for your eyes).

Reproducing violet is difficult; capturing it is an even bigger challenge, because the typical Bayer sensor has red, green and blue pixels. Violet light excites only the blue pixels, and the camera "sees" violet as a very pure blue. That's why older digital cameras confuse the two colors.

The human eye can tell violet apart from blue since the "blue" (S) receptors are actually more sensitive to violet, and the "green" (M) receptors are quite sensitive to blue, but not to violet. The brain can distinguish violet from blue by the difference of response between S and M.

Moreover, in relative terms, the "red" (L) receptors are more sensitive to violet than the "green" (M) ones. (The absolute sensitivity of all 3 receptors to spectral violet is very low, so it is always perceived as a dark color.) This is the probable reason why a mix of red and blue passes off as violet or purple-like.

Since we have mentioned it, it is interesting to clarify that L receptors are not very sensitive to red; they are most sensitive to lemon-green! As happens with violet, the red color is perceived as a dark color because the L receptor is (poorly) sensitive to it; the M and S receptors are completely blind to red. The M receptor is most sentitive to bluish green, and S receptor is most sensitive to blue-violet.

Current digital cameras can also distinguish violet in some fashion, even though the details are scarce (each manufacturer has its own "secret sauce"). Three major strategies are possible: 1) use violet pixels instead of blue ones; 2) consider that green pixels are a bit sensitive to blue but not to violet; 3) use red pixels with dyes that let violet pass through as well.