Demystifying colour (vii) : sRGB vs. Adobe RGB

So we have colour models, colour spaces, gamuts, etc. How do these things relate to digital photography and the acquisition of images? While a 24-bit RGB image can technically can provide up to 16.7 million colours, not all these colours are actually used.

Two of the most commonly used RGB colour spaces are sRGB and Adobe RGB. They are important in digital photography because they are usually the two choices provided in digital cameras. For example in the Ricoh GR III, the “Image Capture Settings” allow the “Color Space” to be changed to either sRGB or Adobe RGB. These choices relate to the JPG files created and not the RAW files (although they may be used in the embedded JPEG thumbnails). All these colour spaces do is set the range of colours available to the camera.

It should be noted that choosing sRGB or Adobe RGB for storing a JPEG makes no difference to the number of colours which can be stored. The difference is in the range of colours that can be represented. So, sRGB represents the same number of colours as Adobe RGB, but the range of colours that it represents is narrower (as seen when the two are compared in a chromaticity diagram). Adobe RGB has a wider range of possible colors, but the difference between individual colours is bigger than in sRGB.

sRGB

Short for “standard” RGB, it was literally described as the “Standard Default Color Space for the Internet“, by its authors. sRGB was developed jointly by HP and Microsoft in 1996 with the goal of creating a precisely specified colour space based on standardized mappings with respect to the CIEXYZ model.

sRGB is the now the most common colour space found in modern electronic devices, e.g. digital cameras, web, etc. sRGB exhibits a relatively small gamut, covering just 33.3% of visible colours – however it includes most colours which can be reproduced by visual devices. EXIF (JPEG) and PNG are based on sRGB colour data, making it the de facto standard for digital cameras, and other imaging devices. Shown on the CIE chromaticity diagram, sRGB shares the same location as Rec.709, the standard colour space for HDTV.

Adobe RGB

The colour space was defined by Adobe Systems in 1998. It is optimized for printing and is the de facto standard in professional colour imaging environments. Adobe RGB covers 38.8% of visible colours, 17% more than sRGB. Adobe RGB extends into richer cyans and greens than sRGB. Converting from Adobe RGB to sRGB results in the loss of highly saturated colour data, and the loss of tonal subtleties. Adobe RGB is typically used in professional photography, and for picture archive applications.

Adobe RGB and sRGB shown in CIELab space

sRGB or Adobe RGB?

For general use, the best option may be sRGB, because it is the standard colour space. It doesn’t have the largest gamut, and may not be ideal for high-quality imaging, but nearly every device is capable of handling an image embedded with the sRGB colour space.

  • sRGB is suitable for non-professional printing.
  • Adobe RGB is suited to professional printing, especially good for saturated colours.
  • A typical computer monitor can display most of the sRGB range but only about 75% of the range found in Adobe RGB.
  • Adobe RGB can be converted to sRGB, but the reverse is not true.
  • An Adobe RGB image displayed on a device with a sRGB profile will appear dull and desaturated.

Demystifying colour (iv) : RGB colour model

The basics of human perception underpin the colour theory used in devices like digital cameras. The RGB colour model is based partly on the Young-Helmholtz theory of trichromatic colour vision, developed by Thomas Young, and Hermann von Helmholtz in the 19th century, the manner in which the human visual system gives rise to the theory of colour. In 1802, Young postulated the existence of three types of photoreceptors in the eye, each sensitive to a particular range of visible light. Helmholtz further developed the theory in 1850, suggesting the three photoreceptors be classified into short, middle and long according to their response to wavelengths of light striking the retina. In 1857 James Maxwell used linear algebra to prove the Young-Helmholtz theory. Some of the first experiments colour photography using the concept of RGB were made by Maxwell in 1861. He created colour images by combining three separate photographs, each taken with a red, green, and blue colour-filter.

In the early 20th century the CIE set out to create a comprehensively quantify the human perception of colour. This was based on experimental work done by William David Wright and John Guild. The results of the experiments were summarized by the standardized CIE RGB colour matching functions for R, G, and B. The name RGB stems from the fact that red, green, and blue primaries can be thought of as the basis for a vector representing a colour. Devices such as digital cameras have been designed to approximate the spectral response of the cones of the human eye. Before light photons are captured by a camera sensors photosites they pass through red, green or blue optical filters which mimic the response of the cones. The image that is formed at the other end of the process is encoded using RGB colour space information.

The RGB colour model is one in which colours are represented as combinations of the three primary colours: red (R), green (G), and blue (B). RGB is an additive colour model, which means that a colour is formed by mixing various intensities of red, green and blue light. The collection of all the colours obtained by such a linear combination of red, green and blue forms a cube shaped colour space (see Fig.1). Each colour, as described by its RGB components, is represented by a point that can be found either on the surface or inside the cube.

RGB colour space cube
Fig.1: The geometric representation of the RGB colour space

The cube, as shown in Fig.1, shows the primary (red, green, blue), and secondary colours (cyan, magenta, yellow), all of which lie on the vertices of the colour cube. The corner of RGB colour cube that is at the origin of the coordinate system corresponds to black (R=G=B=0). Radiating out from Black are the three primary coordinate axes, Red, Green, and Blue. Each of these range from 0 to Cmax, where Cmax is typically 255 for a 24-bit colour space (8-bits each for R, G, and B). The corner of the cube that is diagonally opposite to the origin represents white (R=G=B=255). Each of these 8-bit colours contains 256 values, so the total amount of colours which can be produced is 2563, or 16,777,216 colours. Sometimes the values are normalized between 0 and 1, and the colour cube is called the unit cube. The diagonal (dashed) line connecting black and white corresponds to all the gray colours between black and white, which is also known as gray axis. Grays are formed when all three components are equal, i.e. R=G=B. For example the 50% gray is (127,127,127).

Fig.2: An image and its RGB colour space.

Figure 2 illustrates an RGB cube for a colour image. Notice that while the pink colour of the sky looks somewhat uniform in the image, it is anything, showing up as a swath of various shades of pink in the RGB cube. There are 275,491 unique colours in the Fig.2 image. Every possible colour corresponds to a point within the RGB colour cube, and is of the form: Cxyz = (Rx,Gy,Bz). For example Fig.3 illustrates three colours extracted from the image in Fig.2.

Fig.3: Examples of some RGB colours from Fig.2

The RGB colour model has a number of benefits:

  • It is the simplest colour model.
  • No transformation is required to display data on a screen, e.g. images.
  • It is a computationally practical system.
  • The model is very easy to implement.

But equally it has a number of limitations:

  • It is not a perceptual model. In perceptual terms, colour and intensity are distinct from one another, but the R, G, and B components each contain both colour and intensity information. This makes it challenging to perform some image processing operations in RGB space.
  • It is psychologically non-intuitive, i.e. not able to determine what a particular RGB colour corresponds to in the real world, or what RGB means in a physical sense.
  • It is non-uniform, i.e. it is impossible to evaluate the perceived differences between colours on the basis of distance in RGB space (the cube).
  • For the purposes of image processing, the RGB space is often converted to another colour space by means of some non-linear transformation.

The RGB colour space is commonly used in imaging devices because of its affinity with the human visual system. Two of the most commonly used colour spaces derived from the RGB model are sRGB and Adobe RGB.