How many colours are in a photograph?

The number of colours in a 24-bit colour image is 256³ or 16,777,216 colours. So how many colours are there in a 8 MP photo? Consider the following beautiful photograph:

Picture of a flower on a Japanese quince tree.
A picture of a flower from a Japanese quince

In this image there are 515,562 unique colours. Here’s what is looks like as a 3D RGB histogram:

Most photographs will not contain 16 million colours (obviously if they have less than 16 MP, that’s a given). If you want to check out some images that do, try Here is another image with more colours: 1,357,892 to be exact. In reality, very few real everyday photographs contain that amount of hue varieties.

Stained glass window at Metro Charlevoix in Montreal
Stained glass window at Metro Charlevoix in Montreal

Now as the average number of colours humans can perceive is only around a million, having 16 million colours in an image is likely overkill.

How colour changes our perspective of photographs

The first permanent photograph was produced in 1825 by the French inventor Joseph Nicéphore Niépce. Since then photographs have become the epitome of our visual history. Until becoming widespread in the 1950s, colour images were more of an aberration, with monochrome, i.e. black-and-white, being the norm, partially due to the more simplistic processing requirements. As a result, history of good portion of the 19th/20th centuries is perceived in terms of monochromic images. This determines how we perceive history, for humans perceive monochromatic images in a vastly differing manner to colour ones.

The use of black-and-white in historical photographs implies certain ideas about history. There is the perception that such photos are authentic historical images. By the mid half of the 19th century, photography had become an important means of creating a visual record of life. However the process was inherently monochromatic, and the resulting photographs provided a representation of the structure of a subject, but lacked the colour which would have provided a more realistic context. There were some photographic processes which yielded an overall colour, such as cyanotypes, however such colour was unrealistic. The first colourization of photographic occurred in the early 1840s, when Swiss painter Johann Baptist Isenring used a mixture of gum arabic and pigments to make the first coloured daguerreotype. Such hand colouring continued in successive mediums including albumen and gelatin silver prints. The purpose of this hand-colouring may have been to increase the realism of the photographic prints (in lieu of a colour photographic process) .

The major failing of monochromatic images may be the fact that they suffer from a lack of context. Removing the colour from an image provides us with a different perception of the scene. Take for example the picture of the Russian peasant girls shown in Fig. 1. The image is from the US Library of Congress Prokudin Gorskii Collection, and depicts three young women offering berries to visitors to their izba, a traditional wooden house, in a rural area along the Sheksna River, near the town of Kirillov. Shown in colour, we perceive a richness in the girls garments, even though they are peasant girls in some small Russian town. When we think of peasant Russia in the early 20th century, we are unlikely to associate such vibrant colours with their place in society. Had we viewed only the panchromatic image, our perception would be vastly different.

Gorskii photographs
Russian peasant girls in colour and grayscale (Prokudin Gorskii)

Humans are capable of perceiving approximately 32 shades of gray and millions of colours. When we interpret an image to extract descriptors, some of those descriptors will be influenced by the perceived colour of objects within the image. A monochrome image relies on a spectrum of intensities that range from black to white, so when we view a monochromatic image, we perceive the image based on tone, texture and contrast, rather than colour. In the photograph of the peasant girls we are awed by the dazzling red and purple dresses, when viewing the monochrome image we are drawn to the shape of the dresses, the girls pose, and the content of the image.

Here is a second example of a sulfur stack shown in both colour and grayscale. The loss of meaning in the monochrome image is clear. The representative stack of sulphur is readily identifiable in the colour image, however in the monochrome image, the identifying attribute has been removed, leaving only the structure of the image with a loss of context.

Extracted sulfur stacked in a “vat” 60 feet tall at Freeport Sulphur Co. in Hoskins Mound, Texas.
Extracted sulfur stacked in a “vat” 60 feet tall at Freeport Sulphur Co. in Hoskins Mound, Texas. Kodachrome transparency by John Vachon