What is a color space?

128 vinhnx 24 8/25/2025, 12:33:13 PM makingsoftware.com ↗

Comments (24)

JKCalhoun · 6h ago
What an excellent article. I can't think of anything (except the very esoteric) that it did not cover.

If I had to criticize, I wish it had talked a bit more about printer color profiles (although in this paperless, web-world we live in, perhaps printing is in fact esoteric).

Unlike displays, a printer can't be simply defined with three primaries and a white point. Printer profiles can be quite large as they rely on someone having printed out a copious number of swatches on a given paper type and then measured (with some kind of colorimeter) device independent color values for each swatch. Those are used to build a large table for mapping from device independent color spaces to the printer's gamut.

Those large tables make the profile so large. And then of course interpolation is still required when mapping from a device independent color space to the printer profile. (Now imagine too that you need a different profile for each type of paper you might want to print to since each can represent color differently — plain paper unable to get the levels of saturation that a coated paper can.)

What was shocking to me was just how small the gamut of a printer typically is when seen alongside that of a decent display.

Consider that, in print, you'll never see an image as vivid as you can display on a nice, modern display. (And then consider that there are colors in nature so vivid that even a modern display cannot represent them. Just look at how much color is outside the triangle on the CIE "shark fin" color representation.)

Also not touched on (did I miss it?), all the math presented to map from one color space to another, also allows for "soft proofing" — where in fact you might match to a printer ICC profile but then take the result and match again to the user's display to give you a "preview" of what will be lost when going to said printer.

stronglikedan · 2h ago
> perhaps printing is in fact esoteric

You'd be surprised. It may be heading that way, to arrive in a couple more decades, but not yet. It's still quite the industry (that I'm in).

jimnotgym · 4h ago
That reminded me of a time when a printer manufacturer approached my old team with this problem. They needed a custom driver for a certain region of the world. In this region in a certain industry they liked the highly saturated 'bad' colours from a competitor, and wanted theirs to match. Much paper and ink was spent on this.
bsoles · 3h ago
Not all people see colors the same. The section on "What is color?" could probably mention color blindness.
ChrisMarshallNY · 2h ago
This app is one that I rely on for my testing: https://michelf.ca/projects/sim-daltonism/
pessimizer · 6h ago
> What was shocking to me was just how small the gamut of a printer typically is when seen alongside that of a decent display.

What was a nightmare for me when I worked in prepress was how hard it is to get a convincing purple out of a $20K printer. I used tricks which basically produced nothing like purple in a way that gave customers a good purple impression because the things with a closer actual resemblance to purple always looked awful.

fidotron · 4h ago
Purple and orange were/are common spot colours for that reason.

My father used to work on all sorts of R&D involving things like how much K to use in substitution of CMY without getting desaturated etc. It's a real rabbit hole, especially if you want to reduce the amount of ink used to prevent soaking the paper.

monster_truck · 5h ago
One of the tricks we used in situations that allowed it was to get paper that matched the most important color, this has other downsides but they are more manageable. They were always the last run before everything was taken apart and cleaned for maitenance.
anfractuosity · 29m ago
Nice article, I came across very cool Python library recently too re. colour science - https://www.colour-science.org/

Just started playing with it with my spectrometer based on one of the examples they have, to convert spectral data to a single RGB value.

evaXhill · 6h ago
Really great introductory article on color space in general, I really appreciate that they touched on perceptual uniformity and how we all perceive colors differently. It’s great to find out that applications like Oklab came out recently to fix this by manipulating the distances between colors to try compensate for human perception while also being more straightforward to calculate so that it can be used in real-time applications. Also the UI of this blog post was so aesthetically pleasing, that it was worth burning my retinas with the light mode
furyofantares · 3h ago
I love that this opens with a matter-of-fact statement that colors aren't real, just a phenomenon of perception. This has come up randomly in my life a few times and people always look at me like I'm stoned outta my mind.
meindnoch · 2h ago
And what is not just a phenomenon of perception?
magicalhippo · 24m ago
The light hitting our eyes is not a phenomenon of perception. Each photon hitting our eyes has a certain wavelength, but the resulting color we see is a perception.

A related concept is sound vs psychoacoustics[1]. Sound is just pressure waves, but what we hear is a perception and has all sorts of aspects like masking[2]. The pressure waves contains two different signals but thanks to masking we might only perceive one.

Personally I think color constancy[3] really drives home that color is a perception and not something fundamental like the wavelength of photons.

[1]: https://en.wikipedia.org/wiki/Psychoacoustics

[2]: https://en.wikipedia.org/wiki/Auditory_masking

[3]: https://en.wikipedia.org/wiki/Color_constancy

matsemann · 1h ago
Mathematical proofs based upon axioms?
AlienRobot · 2h ago
Fun fact: just like people have different heights, they have different perceptions of color!
jimnotgym · 4h ago
This is a great primer. I used to work in this field, but not as a colour scientist.

> So why do we have so many different color spaces?

I think there was a missing piece here. Different representations of colour are useful for different things. I'm not going to give any secrets away but...if your trade involves finding out how close one colour is to another, then something that represents colours as points in space could make the maths easier. Then if you wanted to know if one colour was brighter than another, then something that represents a colour with a separate 'brightness factor' would make that trivial.

gopher_space · 34m ago
We were big fans of Marti’s LCMS.
ChrisMarshallNY · 6h ago
That's a terrific article!

I spent the majority of my career at an optical equipment manufacturer, and we wrote a color management system to handle 48-bit color, before any OS manufacturers had it.

Non-trivial stuff, but powerful.

I know of at least one technology that works by converting to an esoteric color space, messing with image data there, then converting back.

jimnotgym · 4h ago
Indeed... and it was always a huge amount of fun to find that converting from one space to another was not always reversible without distortion!
tuzemec · 5h ago
Such an amazing article. Hope the author continues with the rest of the content in the same manner.
AlienRobot · 2h ago
This is a great article about the topic! It covers everything.

But can someone explain this to me?

>Light is technically something called electromagnetic radiation and it has a frequency and wavelength. That wavelength can vary, depending on the energy of the wave. High energy waves have a higher frequency and shorter wavelength, and low energy waves have a lower frequency and longer wavelength.

>This means that the same amount of energy at different wavelengths will not be perceived as the same brightness. For example, a light with a wavelength of 555 nm (green) will appear brighter than a light with a wavelength of 450 nm (blue) even if they have the same energy.

The article asserts that the wavelength (thus color) changes with the amount of energy, but then it says that you can have light of different wavelengths (color) with "the same energy."

moefh · 1h ago
The amount of energy in a wave depends on both its wavelength and amplitude.

So a "blue wave" has more energy than a "red wave" if both have the same amplitude (blue has a shorter wavelength, and energy is inversely proportional to wavelength). But you can have a "blue wave" with the same energy as a "red wave" if you increase the amplitude of the "red wave" to compensate for its longer wavelength.

AlienRobot · 1h ago
Oh, that makes sense! Thanks.

So that means blue has more energy because it pulsates faster, and in spite of this we're less sensitive to it than we are to red, which pulsates slower. It's like our light sensitivity forms some sort of bell curve.

rylan-talerico · 5h ago
Such a great read