Color Contrast Checker
check WCAG color contrast ratio for accessibility compliance
By Bikram NathLast updated
Paste a foreground hex and a background hex to get the WCAG 2.1 relative-luminance contrast ratio between them, with a clear AA/AAA pass-fail result. A practical example: white (#FFFFFF) on a medium-grey (#767676) returns exactly 4.54:1, which passes AA for normal text but fails AAA. Unlike browser DevTools, which only reports contrast for elements already rendered on a page, this tool lets you test hypothetical pairs before writing a single line of CSS.
Try it now — free, instant, no signup
What is Color Contrast Checker?
Color Contrast Checker computes the contrast ratio between any two colors using the WCAG 2.1 relative luminance formula. You enter a foreground color (your text or icon fill) and a background color, and the tool returns a ratio like 7.2:1 alongside a AA/AAA verdict for both normal text (thresholds: 4.5:1 and 7:1) and large text (3:1 and 4.5:1). There is no rendering step — the math runs directly on the hex or RGB values you provide.
When designers already have a mockup open, they often reach for the accessibility panel inside Chrome DevTools or the TPGi Colour Contrast Analyser desktop app, which can eyedropper directly from pixels on screen. This tool is faster when you are working from a token file or Figma spec and just need to verify a named pair like --text-primary on --surface-card before committing it to a design system. WebAIM's Contrast Checker is the closest web equivalent; the main difference is workflow integration — this one lives alongside the other devlab color tools rather than as a standalone site.
One thing that trips up developers: the WCAG 2.1 formula operates in the sRGB color space after gamma expansion, so a color that looks 50% grey visually is not at the midpoint of the luminance scale. #808080 has a relative luminance of about 0.216, not 0.5. This means intuition about which pairs will pass is unreliable without actually running the numbers, especially in the mid-tone ranges where failures are most common.