opyeb ColorOKLCH

15 guides · Contrast

Designing an accessible palette — steps, contrast and colour vision

Basis 28 November 2026 · Contrast · about 8 min

A palette is not eleven pretty colours; it is eleven tools with assigned jobs. The 50 step used for a background, the 600 step used for a button fill and the 900 step used for body text do different work even when they share a hue. An accessible palette is one where that assignment lines up with the contrast thresholds.

Step by step

StepRoleContrast requirement
50 · 100background, surface4.5:1 against text placed on it
200 · 300borders, dividers, disabled3:1 where functionally necessary
400 · 500icons, decoration, large numbers3:1 as large text
600primary button fill4.5:1 against the button label
700 · 800hover, pressed, secondary text4.5:1 as body text
900 · 950body and headings7:1 or more against the background is advisable

The assignment is not a law, but most design systems land close to it. What matters is deciding which background each step sits on and calculating that pair. The matrix does exactly this, expanding the palette into 121 pairs.

A build order

  1. Choose the hue, usually from an existing brand colour.
  2. Set the L and C of step 500; L 55–60% and C 0.12–0.18 is a safe range.
  3. Generate the eleven steps and read the gamut badges. Three or more outside sRGB means lower chroma.
  4. Check 900 text on 50, 700 secondary text on 100, and the 50 label on a 600 button.
  5. Fix failing pairs with the L correction, keeping chroma and hue.
  6. Set the dark values: the opposite end of the ramp, with the accent one or two steps lighter.

Designing for colour vision

Red-green colour vision deficiency affects roughly 8% of men and 0.5% of women. A palette that distinguishes success, warning and error only by red and green presents them as the same colour to those users. The fix is not a different palette but additional signals: icons, text labels, weight and position. Labels help more than hue changes.

When choosing hues, blue at H 250 with orange at H 60 differs in both hue and lightness, which is safe. Red at H 25 and green at H 145 are hard to separate with red-green deficiency. Low-chroma colours are also hard to tell apart even with typical vision, so status colours need real chroma.

Patterns to avoid

Finally, document the palette. A table of hex and oklch() values, roles and the contrast pairs you verified tells the next person what will be affected by a change. The exported code contains both steps and semantic tokens, which makes it a usable basis for that document.

The step assignment summarises common design-system practice; an organisation's brand rules take precedence.

Questions

Can I build fewer than eleven steps?

Yes. Six steps (50, 100, 300, 500, 700, 900) cover most interfaces. What matters is that the pairs you use are checked.

What if the brand colour is outside sRGB?

Use an sRGB approximation as the default and keep the original as a separate P3 token. Make sure the logo file and the CSS agree.

How should status colours be chosen?

Green for success, orange or yellow for warning and red for errors is conventional. Always pair the colour with an icon or label.

Build the palette, then check contrast by role in the matrix.

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