Visualizing Color Solids

I love color theory. Okay, maybe love is a strong word, but ever since seeing people run around with Munsell color charts in architecture school, I've been captivated by the tempting simplicity of setting up a couple mathematical rules and getting something beautiful and harmonical out of it. (I wish there was a profession dedicated to that intersection.)


A teensy bit of theory

I often feel a bit too preoccupied with theory for my - or anyone else's - good, but this post serves two purposes: on the one hand, it's a summary of the main theoretical points, mostly for myself and on the other, it's a way to build intuition about a topic that is suuuper difficult to explain just in words.

But to know what we are looking at later on, we need words for a couple concepts, and that involves a bit of theory.

What even are colors?

Technically speaking, colors are not "physically real". They are the perception created by our optical and nervous system when light hits the cone cells in our eyes. "Okay, smartypants, if they are not real, how come we can turn them into numbers?"

Well, let's take a look at the individual components of this system

Visible Light

Our eyes can detect electromagnetic waves with wavelengths between 380 to 750 nanometers, i.e. the visible spectrum of light.

380 nm 740 nm
The ends of the visible spectrum are practically black, because our eyes barely perceive those wavelengths.

The light hitting our eyes is most often a mix of multiple different wavelengths, unless you are looking directly into a laser pointer - which you absolutely shouldn't do, by the way.

Cone cells

On our retinas, there are 3 types of so-called cone cells, responsible for color detection in bright light. Each of these can detect different wavelengths.

These three lines roughly correspond to the sensitivities of each type of cone cell. It is clearly visible how sensitivity tapers off towards the ends of the spectrum.

Perception

Once light hits the retina, the color sensing cells create electrical signals which get translated into the experience of color in our brains. The responses from the three types of cone cells are combined into a single mix. The wavelengths contained in the light drive which cone cells activate, which our brain then interprets into a single color sensation.

activates
56%
53.4%
49.7%
becomes

Color Solid

Imagine doing the above exercise of color mixing thousands of times, with a different waveform each time. You would get thousands of points in 3D Space, where each axis corresponds to the activation levels of the different types of cone cells. It would look like the following:

The rough shape of the solid formed by all visible colors, in the so-called XYZ color space. The colors in this space form an elongated "tear-based" cilinder due to the shape of the color sensitivity curves of the different cone cells.

This XYZ color space forms the basis of a lot of computational color theory. This blog post will be extended with further explanations of the other perceptual color spaces and transformations between them.