A crash course on a few basic color science acronyms, abbreviations, and concepts.
Editor’s note: the capitalizations of colorspaces are wacky. For example, LAB, Lab, and L*a*b* are all just different stylizations of the same colorspace. No, I don’t get it, either. To help with confusion, I refer to colorspaces on this page in CAPITAL LETTERS (e.g. LAB).
Gamma (or more accurately, gamma correction) is the process of “curving” light output of a display (making certain colors seem darker or lighter than they really are) to better match human color perception. Every color you see on a digital monitor (even now!) has been gamma corrected to be easier to perceive by the human eye.
If monitors displayed color in absolute brightness, to most humans it would appear as a blinding white rectangle with only a few spots being subtly-darker, or subtly-colored. This is because humans are far more sensitive to differences in dark colors than light colors. And so, colors are run through a mathematical function that converts values into ones that better map to humans’ trichromatic vision.
The most common example of this is the sRGB colorspace. Most people don’t realize sRGB is a gamma-corrected interpretation of RGB, and sRGB skews heavily toward darker colors.
A useless colorspace that should never be used.
While HSL’s design is fantastic—separating color into Hue, Saturation, and Lightness—its implementation is deeply-flawed. It was designed in the 1970s to be an easier method of choosing colors without complicated math. But its lack of complicated math is what produces a warped colorspace that is unusable in practice. Its biggest problem is with lightness: dark blue, bright yellow, and dark purple all have the same lightness value (50%), when it’s obvious those colors vary wildly in luminance.
Put another way, HSL fails at both being a human-perceptive colorspace and an objective value colorspace.
HWB and HSV are just remappings of the same approach, and thus inherit the same problems.
Instad, a colorspace like OKLCH should be used which works the same way (just swap Saturation with Chroma), but accurately preserves lightness and does a better job of evenly representing hues.
The perceived brightness of a color, as opposed to luminance, the absolute brightness of a color.
Human eyesight has evolved to be more sensitive to certain bands of light than others, and so recreating this mathematically is incredibly complex and the subject of ongoing research. So the term “lightness” refers generally to any mathematical attempt at reproducing human light sensitivity. This invariably involves some method of gamma correction.
The calculation of “lightness” is not standardized, and the results will vary depending on the method used (e.g. OKLAB).
The absolute brightness of a light source, as measured in lumens. Humans don’t perceive absolute brightness linearly, which is why gamma correction is needed.
“It is called the OKLAB color space, because it is an OK LAB color space.”
A colorspace created by Björn Ottosen in 2020 with the purpose of improving the human-perceptive LAB colorspace from 1976. It stands for Lightness (perceived brightness), A (red/green axis), and B (blue/yellow axis).
Those of you old enough to have used a CRT may have noticed red/green and blue/yellow picture color adjustments in the TV settings. That’s LAB!
Björn posted a very thorough explanation of the thought behind OKLAB as well as math and code samples to encourage adoption. And adopt people have—it’s recieved unanimous praise from color scientists, and it’s even supported in Safari today.
Just as the LCH colorspace (Lightness, Chroma, Hue) is a remapping of LAB, so is OKLCH to OKLAB. The math is the same, but since OKLAB is a different starting point from LAB, OKLCH will produce better results than traditional LCH.
The general principal of LCH is to keep the Lightness axis as-is, but convert the hard-to-use A and B axes into the friendler Chroma (color intensity) and Hue axes.
OKLCH should always be used in place of HSL, because it successfully accomplishes what most people think HSL does.
A colorspace invented in 1931 to map all human-perceivable colors into a three dimensional space within [0, 0, 0] and [1, 1, 1].
To be perfectly honest I don’t have a good understanding of why this is still so prevalent. My only experience with it is that most color math still relies on XYZ for converting from one colorspace to another. Perhaps its existence is explained by simply being the foundation of modern color science, and there hasn’t been a need to replace this model.