A contrast check just failed, and the color it failed is your brand color. The tempting fixes are both bad: ignore the result and ship text people struggle to read, or throw the brand color out and redesign around whatever dark shade happens to pass. There is a third fix, quieter than either: move the color the smallest distance that passes, and let the original keep the jobs it was already good at.
The Color Contrast Checker on Ovatly measures a text color against a background color with the WCAG 2.1 relative luminance formula and reports pass or fail for AA and AAA, for normal and large text. This guide is the fix that follows a fail: darken one step at a time, re-check after each step, and stop the moment it passes.
Contents
- Quick answer
- Why one step at a time
- How to fix a failing pair, step by step
- Worked example: the decision tree for one blue on white
- Protecting the design: where the bright original still belongs
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
To fix low contrast text without ruining your design: darken the failing color one step at a time, re-checking it in the Color Contrast Checker after each step, and stop at the first step that passes. Then split the roles. The darkened step does the reading work as text, and the original bright version stays on large headings, borders and graphics, where thresholds are lower or none. The design keeps its color; only the text changes, and only by as much as the threshold demands.
Why one step at a time
Every step away from your original color is a step away from the design you approved. A single jump to a much darker shade passes easily, but it passes by more than necessary, and the page quietly stops looking like itself. Small steps protect the design for a simple reason: the first step that passes is by definition the closest passing color to the original. Anything darker is distance you did not need to travel.
Stepping also keeps the relationship between the two versions obvious. A text color that is plainly a darker step of the brand color reads as part of the same family. A replacement color, however tasteful, reads as a second brand color that nobody chose.
How to fix a failing pair, step by step
- Measure the pair as it stands. Open the Color Contrast Checker, enter the text color and the background color, and read the ratio and the preview.
- Decide which row you must pass. Normal text needs 4.5:1 at AA and 7:1 at AAA; large text (at least 18pt, or 14pt bold) needs 3:1 at AA and 4.5:1 at AAA. If the pair already passes your row, stop here: there is nothing to fix.
- If it fails, build the darker steps of your text color with the Shades and Tints Generator, which produces the steps in order from the original downward.
- Run the first darker step through the checker against the same background. If it fails, take the next step down and check again. Stop at the first step that passes.
- Apply the split: set text in the passing step, and keep the original bright color on large headings, borders and graphics.
- Use Swap colors in the checker to confirm the inverse pairing too, if the design uses these colors the other way round.
Worked example: the decision tree for one blue on white
Start with the checker's example pair: text #2563EB on background #FFFFFF, measuring 5.17:1. Before changing anything, ask which verdict you actually need, because this one pair passes three of the four rows. AA for normal text needs 4.5:1: pass, so at AA nothing moves and the original blue stays exactly as designed. AA for large text needs 3:1: pass. AAA for large text needs 4.5:1: pass.
Only the fourth row changes the plan. AAA for normal text needs 7:1, and 5.17:1 fails it. So if, and only if, your requirement is AAA body text, the darkening steps begin: take the next darker step of the same blue, check it against white, and continue down one step at a time until a step clears 7:1. The first step that clears it becomes your text color. Notice what did not happen at any point: the background never changed, the hue never changed, and the original blue was never discarded. It simply stopped being the body text color, and kept every other job.
Protecting the design: where the bright original still belongs
The split is what makes the fix cheap. Large headings need only 3:1 at AA and 4.5:1 at AAA, so a bright color that fails as body text often passes untouched as a headline. Borders and graphics carry no text threshold at all. Buttons and panels in the original color stay as they are, provided any text on them is checked as its own pair.
The result is a palette with two honest versions of one color: the bright original doing the visible brand work, and its darker step doing the reading. Readers get text that passes; the design keeps the color it was built around. What you must not do is blur the split, using the bright version for small text in one corner of the page because it looks better there. The threshold does not grade on looks.
Limitations and honest tradeoffs
Darkening works when the failing color has room to darken. A color that starts very dark against a dark background may have no passing step in that direction, and then the honest fix is the other side of the pair: lighten the text or change the background, checking each change the same way. The checker also measures one pair at a time, so a full page means several checks, including hover and disabled states. And contrast remains only one part of readability: thin font weights and small sizes can still be hard to read at a passing ratio, so the fixed text deserves a final human look at its real size.
Common mistakes
- Jumping straight to a much darker shade. It passes, but by more than necessary, and the design loses its color for no gain.
- Fixing a pair that already passes. Check which row you must meet first; at AA, the worked example above needed no change at all.
- Darkening once and not re-checking. A step is a guess until the checker confirms it against the actual background.
- Replacing the brand color everywhere. The bright original still passes for large headings and carries no threshold on borders and graphics.
- Applying the split inconsistently. Small text in the bright version, anywhere on the page, is still small text failing its row.
FAQs
What is the first thing to try when text fails contrast? Darken the failing color one step at a time and re-check after each step. Stop at the first step that passes, so the color stays as close to the original as the threshold allows.
How do I darken a color in even steps? Use the Shades and Tints Generator to build the darker steps of your color, then run each step through the Color Contrast Checker against your background until one passes.
Do I have to change my brand color everywhere? No. Reserve the original bright version for large headings, borders and graphics, which have lower thresholds or none, and use the darkened step only where text needs the higher ratio.
When does a passing pair still need fixing? When your target is stricter than the level it passes. #2563EB on white at 5.17:1 passes AA for normal text, so at AA nothing needs to change. It fails AAA for normal text, so only a AAA requirement triggers the darkening steps.
What counts as large text for contrast? Text of at least 18pt, or 14pt bold. Large text has lower thresholds: 3:1 at AA and 4.5:1 at AAA, compared with 4.5:1 and 7:1 for normal text.
Conclusion
A failed contrast check is a measurement, not a redesign brief. Darken by steps, stop at the first pass, and split the roles so the bright original keeps the work it passes at. Your brand survives the fix intact, and your readers get text that clears the threshold it actually faces. The Color Contrast Checker is where every step gets verified. If you want to see the failures this fix answers, our companion guide on contrast mistakes that make text hard to read covers them in full. For more guides in this series, see our Color and Design Tools guides.
References
- W3C, Web Content Accessibility Guidelines (WCAG) 2.1, the specification behind the contrast thresholds used here: https://www.w3.org/TR/WCAG21/