WCAG Contrast Checker
Test a colour pair against WCAG AA and AAA — with the ratio computed, not guessed.
What this tool does
Contrast ratio is defined by WCAG as the relationship between the relative luminance of two colours, on a scale from 1:1 (identical) to 21:1 (black on white). This tool computes it with the published formula, which converts each channel from sRGB to linear light before weighting them — green counts for far more than blue, because human vision is built that way.
That weighting is why intuition fails here. A pale yellow on white looks like reasonable contrast and scores around 1.4:1; a mid-blue on white looks weaker and scores above 8:1. Guessing does not work, which is the entire reason for measuring.
The thresholds are 4.5:1 for normal text and 3:1 for large text at AA, rising to 7:1 and 4.5:1 at AAA. Large means 18pt, or 14pt bold. Non-text elements that convey meaning — icons, input borders, focus rings — need 3:1, which is the requirement most often missed. The checker reports all five thresholds for every pair, so nothing is hidden by the target you picked. What it cannot do is look at your page: it measures the two colours you type, so text over a gradient, an image or a translucent panel has to be reduced to a flat pair yourself before the number means anything.
How to use it
- Pick two colours. Use the foreground and background swatches, or paste a list of pairs — one per line, written as "#111827 on #ffffff" or separated by a comma.
- Choose the target. AA or AAA, normal or large text. The report still shows every threshold, so the target only decides what counts as a pass.
- Read the ratio. You get the number, a rendered preview of the text on that background, and pass or fail badges for AA normal, AA large, AAA normal, AAA large and the 3:1 bar for interface components.
- Take the suggested colour. When a pair fails, the checker walks the foreground lighter or darker at the same hue until it clears the target, and reports the first shade that does.
Processing & privacy
Runs on your device. Your file is processed directly in this browser.
Common use cases
Checking a design system
Verify every text-on-surface pair before it is used in a hundred components.
Fixing an audit finding
Contrast is the single most common issue in automated accessibility reports.
Choosing a brand colour
Find out early whether a brand colour can carry text, or only sit behind it.
Reviewing muted text
Secondary and placeholder text is where contrast quietly fails most often.
Questions
What ratio do I actually need?
Does this cover the whole of WCAG?
Why does my colour fail when it looks fine?
What about transparency?
Why does the suggested colour keep the same hue?
Is APCA a replacement?
Related tools
- HEX to RGB — Convert a hex colour to RGB values.
- RGB to HEX — Convert RGB values to a hex colour.
- HEX to HSL — Convert hex to hue, saturation and lightness.
- HSL to HEX — Convert HSL values back to a hex colour.
- CMYK Converter — Convert between RGB and CMYK for print work.
- Color Picker — Pick a colour and copy it in any notation.