Fix a failing contrast pair without wrecking the design
A worked tutorial: take a real failing pair, find the nearest passing color that preserves the hue, and verify it in both themes.
Measure how far you are from passing
Enter the failing pair and read the gap, not just the verdict. A 4.2:1 pair needs a nudge — one lightness step. A 2.1:1 pair needs surgery — different color or different background. The size of the gap decides the tactic, and most pairs designers actually ship are in nudge range, which is good news.
Identify which side should move. Backgrounds usually have more freedom (darken a surface, add a scrim), while brand text colors are politically expensive to change. Move the side with fewer stakeholders first.
Shift lightness, protect hue
Use the nearest-accessible fix: it walks the failing color darker (or lighter on dark backgrounds) along the same hue until the ratio passes, changing lightness while preserving identity. A teal link at 3.9:1 becomes a slightly deeper teal at 4.5:1 — recognizably the same brand, legally different luminance.
Resist the urge to overshoot to 7:1 'to be safe.' Every extra step away from the brand hue costs recognition; pass with margin (aim ~4.7:1 for a 4.5:1 requirement to survive rendering differences) and stop.
Verify the fix everywhere it appears
A fixed pair is a token change, not a one-spot edit: the same teal appears in links, icons, borders, and charts. Re-check each context, because the fix was computed against one background and the color may sit on three. The palette matrix catches the stragglers in one view.
Finally, check the other theme. Contrast fixes are mode-specific — a darkened light-mode link is irrelevant to dark mode, which needs its own pass. Two modes, two measurements, no exceptions.
Tip
Screenshot the before/after pair side by side for the design review. 'Same hue, now passing' ends the aesthetic objection before it forms.
Related free tools
Want to apply this right now? Open the color palette generator and try it with your own brand color — free, no sign-up.