← Blog

Building an Accessible Color Palette from Scratch

Retrofitting accessibility onto a finished palette is miserable: every fix ripples. Designing it in from the start is almost free. Here's the order of operations that makes it automatic.

Step 1: Fix your text pairs first

Before any brand color, lock the combinations people will read all day: primary text on background (aim for 12:1+), secondary text (7:1+), and placeholder/disabled (own decision, but findable). These pairs are the skeleton; brand colors hang off them.

Step 2: Give every accent a 'text-safe' variant

For each brand color, derive the nearest shade where white text passes 4.5:1 (your button color) and the nearest shade that passes 4.5:1 on your background (your link color). Same hue, adjusted lightness. Users see one consistent color; the system knows it's three.

RoleExampleMust pass
Brand display#4895efnothing — headlines & decoration only
Button fill#2463eb4.5:1 with white label
Link on white#1d4fd74.5:1 with background
Focus ring#2463eb3:1 with adjacent colors

Step 3: Design the states, not just the resting color

Hover, active, focus and disabled each need contrast rules: focus indicators need 3:1 against what surrounds them, and a hover state that only shifts hue (not lightness) is invisible to many users. Step along your shade scale — 600 resting, 700 hover, 800 active — and states stay both visible and consistent.

Step 4: Never let color carry meaning alone

Error fields get an icon and a message, not just a red border. Chart series get labels, success states get a check. This is the WCAG rule designers forget most — 'Use of Color' fails even when every contrast ratio passes.

Step 5: Audit as a table

List every foreground/background pair your UI actually uses and check each one — it's a ten-minute job with a contrast checker and it catches the combinations nobody designed on purpose, like secondary text on a tinted card.

Sources and further reading