The HCL Color Space¶
The most well known color space is the Red-Green-Blue (RGB) color space. The RGB color space is mainly based on the technical specification of digital screens such as computer screens or TVs. The color of each individual pixel on a screen is created by mixing intensities of red, green, and blue (additive color mixture).
In contrast, the Hue-Chroma-Luminance color space is based on how human color perception works.
Path trough the HCL space¶
The animation shows the HCL color space as a volume. The vertical
axis shows the luminance dimension from
L=0 (black) to
hue and chroma are shwon on the XY plane. The angle (from
shows defines the hue, the radial distance to the center the chroma.
The solid line inside the volume shows the path of the default
diverging_hcl color map (with
n=11 colors) trough the HCL
Importance of the luminance dimension¶
As an example, the picture below shows a juicy and delicious apple. Our visual system needs a fraction of second to identify the object.
The plot below shows the very same picture again but the color information has been modified. The left apple has no color at all (the chroma of all pixels is set to 0), the apple on the right hand side is blue instead of red - something which does not exist in nature. However, it is still easy to identify the object as an apple.
One reason is that our visual system (eye-brain) is very efficient to identify smallest changes in luminance (the lightness/darkness of a color). Our eye consists of different photo-reactive cells, so called cone cells and rod cells. Three different types of cone cells allow our visual system to distinguish between different colors and are only concentrated in a very small area in the center of our retina. The rod cells are about 5 to 6 times more common and are placed on a larger area around the center of our retina. Rod cells are only sensitive to the intensity of light which allows us to identify smallest differences in luminance.
The luminance information is gives us an impression of the shape of the object which allows us to quickly identify an object. The luminance information in both images below is maintained which makes it easy to identify the object.
The next image shows the same apple again, but the luminance is held constant. Thus, it is getting very difficult to capture the actual shape of the object and to extract the important information from the image.
This simple example shows the effect of the luminance information. Even if additional color coding is used on top the luminance information is still processed by our brain and can either support the reader if used in an effective way, or make it hard or even impossible to gather the most important information if used without caution.
Effective Color Palettes¶
The colorspace package provides an easy to use interface to choose effective color maps based on the HCL color space.
To be done …