Color Management

pleasee

Color management is about ensuring that colors in pictures or videos are reproduced as accurately as possible on every medium, such as screens, print media, or other output devices. This is especially important if you're using wide-gamut profiles and screens, which are becoming more and more commonplace nowadays.

People keep telling me that no one cares about color management but I find that very rude. Posting a nice picture of a cat should not suddenly turn it into a moody contrasty mess with bad lighting just because your social media website does not handle color profiles correctly. If your software touches pictures in any way, it should probably be aware of color management.

This does not mean that it should have to deal with it specifically, but that it should be aware of color profiles—even if this just means that any unknown input will simply be converted to Standard RGB before further processing happens.

Standard RGB

Everyone pretends standard RGB is a “universal” color profile in some way, and so much software always assumes everything is in sRGB! This isn’t always appropriate!!

Consider, for example, this picture of a cat. The original image shown on the right uses the Adobe RGB profile, and the left image is what happens when software mistakenly reinterprets the image as sRGB. You might notice that the reds and greens become especially desaturated (though, depending on your viewing conditions, the difference may or may not be very discernable).

A much more appropriate solution would be to directly display as much of the full Adobe RGB gamut as possible, or to transform the image to the sRGB gamut if it’s really necessary.

However, the general state of affairs regarding this topic is rather lacking.

Color Blending

Let’s talk about gamma. Simply put, it’s just a function that maps number values to brightness in each of the red, green, and blue channels.

It exists because apparently human vision is very strange and perceives colors nonlinearly (specifically, perceiving more details in dark colors), so it would be appropriate to have the computer do the same to get as much out of it as possible (why have details you’ll never see?).

Hence, the sRGB gamma curve looks like this:

It’s basically just a polynomial: ɣ(x) = x2.2.

There is, of course, no inherent problem caused by doing this. The problems start appearing if you now try to edit an image. Specifically, for normal blending, colors should always be blended in linear gamma.

This issue becomes most evident in gradients.

CSS gradient

This is a gradient from pure red to pure green. Perhaps you’re already used to the look, but quite frankly... what is this muddy brown color doing there in the middle?

The muddy brown is caused by the gamma curve, and is made noticeable the fact that we’re going all the way across the color wheel. Because it transitions from (R: 1, G: 0, B: 0) to (R: 0, G: 1, B: 0), there will inevitably be a mid-point that looks like (R: 0.5, G: 0.5, B: 0). However, because the sRGB gamma curve maps 0.5 to a darker color, the color in the middle is also darker than either of the boundary colors.

If you blend the same colors in linear gamma, you get the actual expected result:

Just a straight line across the color wheel, without any weird brightness changes!

You can find this kind of incorrect blending in many places:

Curses and Hexes For Your Computer

Generally, I think there should be much more awareness of colors being a complicated mess, because otherwise people will be confused when their picture takes on strange hues, changes brightness, or features other strange effects that weren’t present before they used software without color management.

In fact, using more avant-garde color profiles, you can get much more extreme results from color misinterpretation.

Here's a handy test image that uses an extremely cursed color profile so that it produces two completely different images depending on whether color management is supported or not.

Click here to download
(Note that the grainy top half may look brighter or darker depending on screen resolution, scaling, and other factors. This is because it's extremely cursed)

Thank you for coming to my ted talk please handle color profiles ok

Appendix