Accessible Text Color Suggester

Automatically adjust a color's lightness until it passes WCAG contrast on your background.

Sample text
Original ratio
Suggested color
New ratio

About the Accessible Text Color Suggester

Knowing that a color pair fails WCAG contrast is only half the problem — the other half is finding a nearby color that actually passes without straying so far from the original that it no longer matches the intended brand color. This tool takes a background color and a starting text color, and automatically nudges the text color's lightness up or down, step by step, until it reaches the exact point where it passes your chosen WCAG threshold.

How it works

Starting from your chosen text color, the tool converts it to HSL and walks the lightness value incrementally in the direction that increases contrast against your background — darker if the background is light, lighter if the background is dark — recalculating the contrast ratio at each step using the same WCAG luminance formula used throughout this site's Contrast Checker. It stops at the very first lightness value that clears your selected threshold, giving you the smallest possible adjustment needed rather than an arbitrary, overly cautious change.

Common use cases

  • Fixing a brand color that fails contrast requirements with the smallest possible visual change
  • Automatically generating an accessible text color variant for a design token that must stay close to the original hue
  • Quickly resolving accessibility audit findings without manually testing several color candidates by hand
  • Producing an accessible 'safe' version of a color for documentation alongside the original brand value
  • Understanding exactly how much lightness adjustment a given color combination actually needs

Tips for best results

The tool only adjusts lightness, deliberately leaving hue and saturation untouched, since that's what keeps the suggested color recognizably related to your original — if the suggested result still doesn't feel close enough to your brand color, it may be a sign the background itself needs to change instead, since some hue and background combinations simply can't reach an accessible lightness without becoming a different color altogether. Always apply the suggested color in context and re-check it with the standard Contrast Checker tool afterward, since real text also depends on font weight and size, both of which affect which WCAG threshold actually applies.

Frequently asked questions

Adjusting lightness preserves the color's recognizable identity and hue most reliably, which matters for brand consistency. Changing hue or saturation instead could shift a blue toward purple or green just to satisfy a contrast number, which usually isn't what anyone actually wants from an 'accessible version' of a specific brand color.

The suggester targets the standard WCAG AA threshold of 4.5:1 for normal text by default, with an option to target the stricter AAA threshold of 7:1 instead if your project requires the higher standard.

The current version adjusts the text color to fit a fixed background. If adjusting the background is more appropriate for your situation, use the resulting ratio as a reference and try swapping which color is treated as fixed.

In most cases yes, since only lightness shifts and the hue stays intact, but for colors that need a very large lightness jump to pass, the result may end up noticeably lighter or darker than your other brand shades — treat a large suggested shift as a signal to reconsider the pairing rather than automatically accepting it.

Yes — you can choose whether you're checking normal or large text, since WCAG's required ratio drops from 4.5:1 to 3:1 for large text (roughly 18pt regular or 14pt bold and above), which often means a smaller, more brand-faithful adjustment is enough.