Glossary
Gamma
The non-linear mapping between stored values and emitted light
Gamma is the non-linear relationship between pixel values stored in an image file and the actual light intensity a display emits. Mathematically: output_intensity = input_valueγ, where γ ≈ 2.2 for the sRGB standard.
Why this isn’t simply linear: the human eye is far more sensitive to differences in dark tones than light tones. A linear encoding would waste most of an 8-bit channel’s 256 values on highlight detail no one can see, while crushing dark tones into a few barely-distinguishable values. Applying gamma allocates more of the encoding to dark values where the eye actually cares.
Concrete: an 8-bit pixel value of 128 (halfway between 0 and 255) doesn’t mean half the light intensity. It means about 22% of full intensity, because 128/255 = 0.502, and 0.502² (gamma 2.2 is well-approximated by squaring) ≈ 0.252, but the full sRGB transfer is slightly more nuanced near zero. The intuition: middle-grey values are actually quite dark in linear light.
Practical implications: blending two colours in “normal” sRGB space produces results that look too dark — the average of black and white in sRGB looks much darker than the optical midpoint. Software like Photoshop and Figma offer “linear blending” options that convert to linear light, average there, then re-encode. CSS’s color-mix(in oklab, ...) does this automatically. Gamut-aware tools handle this transparently; manual hex maths usually doesn’t.
Related
Published May 16, 2026