A contrast ratio checker built for real design decisions
This contrast ratio checker measures the WCAG 2.1 contrast between any foreground and background color and shows you, in real time, whether the pair clears the thresholds for body copy, large text, and non-text UI components. You get the numeric ratio, AA and AAA badges, and a live preview of actual rendered text — no guessing, no copy-pasting hex codes between tabs.
Contrast ratio is a comparison of the relative luminance of two colors, producing a value from 1:1 (identical) up to 21:1 (pure black on pure white). The math is defined by the W3C in WCAG 2.1 Success Criterion 1.4.3, and the same formula powers every reputable checker on the web.
What the WCAG thresholds actually mean
The tool grades your pair against the four ratios designers hit most often:
- 4.5:1 — WCAG 2.0 level AA requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text.
- 3:1 — WCAG 2.1 requires a contrast ratio of at least 3:1 for graphics and user interface components (such as form input borders).
- 7:1 / 4.5:1 — WCAG Level AAA requires a contrast ratio of at least 7:1 for normal text and 4.5:1 for large text.
Large text is defined as 14 point (typically 18.66px) and bold or larger, or 18 point (typically 24px) or larger. The checker flags each tier independently so you can ship a heading at brand color while keeping body copy at the stricter ratio.
Fix failing pairs without abandoning your brand
When a combination fails, the live preview makes it obvious which way to push. Darken the foreground, lighten the background, or nudge lightness in HSL until the badges flip to pass. Once your hero pair clears AA, build out the rest of your system with the Color Safe Palette Builder or audit every combination in one shot with the Color Palette Contrast Grid.
For deeper diagnostics — including APCA Lc scores and rendered-text comparisons — pair this check with the Color Legibility Analyzer. If your color is locked but the ratio is short, generate a tuned variant with the Tint & Shade Scale Generator and re-test in seconds.
Where contrast matters beyond text
WCAG 1.4.11 extends the 3:1 rule to interactive components and meaningful graphics — button borders, focus rings, form outlines, icons that convey state, and data visualizations. The MDN guide to color contrast walks through these cases in detail, and the tool's UI-component mode mirrors that 3:1 threshold so you can validate chips, toggles, and chart elements alongside text.
Test, tune, ship — and keep accessibility a design constraint instead of a last-minute audit.