# Why so many color spaces for digital image representation?

In RGB representation, we use 24 bits, so we can get 2^24 or about 16 million colours. And our eye can not distinguish so many colors. So perhaps we can find the distinct colors (which would be a small subset of the original 16 million colors) a human eye can recognize and give them codes. This would require less than 24 bits to represent. Is this the basis of color spaces? I also wonder how the color space conversion equations are arrived at - I mean the coefficients k, l and m in equation like Y = kR+lG+mB. Are there any references where the numerical problems of this topic are handled?

• Hi. Please include your findings so far regarding color spaces and color theory, and edit your posting to include a concise question the community can answer. – Juancho Nov 30 '18 at 12:14
• Your question doesn't match the title. – Yves Daoust Nov 30 '18 at 13:54

we use 24 bits, so we can get 2^24 or about 16 million colours. And our eye can not distinguish so many colors.

This is not entirely accurate. Yes, 24bit is theoretically enough for human vision but this assumes that the display is also capable of showing all of these colours.

So perhaps we can find the distinct colors (which would be a small subset of the original 16 million colors) a human eye can recognize and give them codes.

To an extent, this is what web colours do.

Is this the basis of color spaces?

No. A colour space is defined by a small set of "fundamental" wavelengths (sometimes closely following the physiology of the human eye) and how their combinations reproduce other colours. It's not just any Red, Green and Blue light that can reproduce a wide range of colours that the human eye can see.

I also wonder how the color space conversion equations are arrived at - I mean the coefficients k, l and m in equation like Y = kR+lG+mB. Are there any references where the numerical problems of this topic are handled?

Given two different colour spaces, the conversion equations are simply a mapping between the same colours. For an example, see the mapping between RGB and HSI. For specific mappings it will be more practical to search for more information about them particularly.

Hope this helps.

Colors are mostly described on 24 bits for convenience, as this is exactly 3 bytes, corresponding to the three R, G, B channels. This Wikipedia article reports 10 million perceivable colors in the human species. https://en.wikipedia.org/wiki/Color_vision#In_other_animal_species. We are not far.

The quantitative modelling of color was standardized by the CIE as early as 1931, when they introduced the XYZ coordinate system. https://en.wikipedia.org/wiki/CIE_1931_color_space

It doesn't make much sense to use color codes, there are far too many of them. Anyway, paint manufacturers ares still using the Pantone gamut (a few other gamuts are in use). https://en.wikipedia.org/wiki/Pantone#Pantone_Color_Matching_System

The coefficients for Y were introduced along with digital television technology and standardised by the ITU. https://en.wikipedia.org/wiki/YCbCr#ITU-R_BT.601_conversion