Contrast checker
Check WCAG contrast ratios of color pairs, with AA and AAA verdicts and fix suggestions.
Related tools
Contrast checker
Paste foreground and background pairs, one per line — #7a1f2b on #ffffff, #333, #eee or rgb(0, 0, 0) #fff — and the WCAG 2 contrast ratio of each pair comes back instantly, with a pass or fail verdict for every conformance level. The ratio runs from 1 : 1 (no contrast at all) to 21 : 1 (black on white) and is computed from relative luminance exactly as the guidelines define it, so the numbers agree with browser inspectors and audit tools.
WCAG names two levels. AA, the one most laws and contracts reference, requires 4.5 : 1 for normal text and 3 : 1 for large text. AAA, the stricter target, asks for 7 : 1 and 4.5 : 1. Text counts as large from 18 pt (about 24 px) in regular weight, or from 14 pt (about 18.7 px) in bold — that is why a heading can pass at a ratio a paragraph fails. The report spells out all four checks per pair; switch the output to Compact for one line per pair, which is the quicker read when you are sweeping a whole palette.
When a pair misses AA for normal text, turn on "Suggest fix" and the tool darkens or lightens the foreground in small lightness steps, keeping its hue, until it reaches 4.5 : 1 — then prints the nearest passing hex ready to paste back into your stylesheet.
Everything runs in your browser; unreleased brand palettes never leave your device. Colors can be 3- or 6-digit hex with or without the hash, rgb() or rgba(), or a common CSS name — the basic 16 plus the popular extended ones. The full 148-name CSS list is deliberately not carried, so write exotic names as hex. A line that isn't a color pair is noted calmly and the rest keeps processing.