opyeb ColorOKLCH

15 guides · Foundations

Perceptual lightness — why ten points is ten points

Basis 28 November 2026 · Foundations · about 7 min

Pixel values are not brightness. An sRGB value of 128 is half the maximum number but about 21% of the light, and the eye reads it as a mid tone. Gamma encoding, relative luminance and perceptual lightness are the three ideas that separate these, and uneven palettes usually come from mixing them up.

Three kinds of brightness

ConceptComputed fromUsed for
sRGB valueintegers 0–255storage and display
Relative luminance Ygamma-decoded, 0.2126R + 0.7152G + 0.0722BWCAG contrast
Perceptual lightness Lthe L of OKLabdesigning palette steps

Relative luminance is close to physical light; perceptual lightness is close to what a person sees. WCAG contrast uses luminance, and step palettes are designed on lightness. The same colour gives different numbers in each. Mid grey at sRGB 128 has a relative luminance of about 0.216 and an OKLCH L of about 60%.

Gamma and cube roots

sRGB uses roughly a 2.2 power curve. To linearise a stored value v, divide by 12.92 when v is at most 0.04045, otherwise take ((v + 0.055) ÷ 1.055)^2.4; the reverse is the inverse. OKLab applies a cube root on top of that, which brings the curve closer to the eye's response. Those two steps are what make “ten more points of L” feel like a similar change everywhere.

Choosing the step spacing

Spacing 50 to 950 evenly makes the middle feel crowded and the ends feel stretched. The calculator anchors step 500 and applies offsets of +10, +20, +29, +35 and +39 upward and −9, −18, −26, −33 and −40 downward. The lighter half is spaced a little wider because the eye is less sensitive to differences near white.

Those offsets are a starting point, not a law. If the brand colour sits at L 58%, step 500 is 58%, step 50 is 97% and step 950 is 18%. A darker brand at L 45% pushes the whole ramp down so step 950 lands near 5%, where chroma almost disappears. In that case reduce the offsets or narrow the ramp to 100–900.

How it relates to contrast

A lightness difference and a contrast ratio move in the same direction but are not the same thing. L 90% against L 10% is about 17:1 while L 70% against L 30% is about 5.5:1. The same difference in L gives a different ratio depending on absolute brightness, so a rule such as “40 points of L always clears 4.5:1” does not hold. Compute contrast from luminance, always.

The luminance formula follows WCAG 2.1; OKLab follows CSS Color 4 and Ottosson's paper.

Questions

Is L 50% the same as grey 128?

No. sRGB 128 has an OKLCH L of about 60%; L 50% is darker.

Can I just space L by ten points?

You can, but the ends bunch up. Differences near white and black are less visible, so the spacing is usually adjusted.

Can dark mode simply invert L?

Mostly, but accents need one or two steps lighter. At the same chroma they look duller on a dark background.

Move only the L slider and watch the eleven steps re-space themselves.

Open the tool

Basis date 28 November 2026. Written against the W3C specifications, the APCA documentation and published browser support tables; updated when they change.

Back to the guides