Contrast Checker

Check the contrast ratio between text and background against WCAG AA and AAA thresholds, with real-size preview. Free, private, instant.

Check colour contrast ratios between foreground text and background colours against WCAG 2.1 AA and AAA accessibility guidelines in real time. Contrast Checker computes the exact W3C relative-luminance ratio (from 1.00:1 to 21.00:1) and shows live pass/fail verdicts for normal text, large text, and UI components alongside 16px and 24px previews — completely in your browser with no sign-up.

How to use Contrast Checker

  1. Pick your Text color and Background color using the visual colour pickers or by typing 6-digit HEX codes.
  2. Read the live contrast ratio (for example, 15.80:1) and check the five WCAG 2.1 PASS/FAIL rows directly below.
  3. Inspect both live previews (16px body text and 24px large text) to judge real-world legibility.
  4. Darken the foreground or lighten the background until every threshold required by your project passes.

Who it is for

UI/UX designers, frontend developers, and brand teams building accessible websites and apps: verifying button labels, form placeholders, link colours, dark-mode palettes, and brand guidelines before shipping to production or undergoing an ADA or EAA accessibility audit.

How it works

  • Each sRGB HEX colour is linearised using the official W3C WCAG 2.1 formula to compute relative luminance (L), then compared as (L1 + 0.05) / (L2 + 0.05) where L1 is the lighter colour — so pure black on pure white reports exactly 21.00:1.
  • Five pass/fail badges evaluate WCAG 2.1 thresholds simultaneously: 4.5:1 for AA normal text, 3.0:1 for AA large text (24px regular or ~18.67px bold) and UI components, 7.0:1 for AAA normal text, and 4.5:1 for AAA large text.
  • Two live sample blocks (16px body text and 24px large text) update immediately on every picker move or HEX edit inside your browser.

What it cannot do

  • It calculates standard WCAG 2.1 luminance contrast ratios, not the experimental WCAG 3 APCA perceptual score (which weighs font weight and polarity differently).
  • It assumes opaque solid backgrounds; if text sits over a semi-transparent overlay, gradient, or photograph, sample the lowest-contrast pixel behind the text first with Image Color Picker.
  • Passing a numeric contrast ratio alone does not guarantee full accessibility — font size, line height, and avoiding colour-only status cues still matter.

Frequently asked questions

What contrast ratio is required for WCAG AA compliance?

Normal body text requires at least 4.5:1. Large text (24px regular or 18.67px bold and above) and non-text UI components such as icons and input borders require at least 3.0:1.

When do I need WCAG AAA (7:1) instead of AA?

AAA (7:1 for normal text, 4.5:1 for large text) is the enhanced standard recommended for long-form reading, government portals, healthcare apps, and audiences with low vision. Most commercial websites target AA as their baseline.

Why does a white button with bright yellow or orange text fail even though it looks vivid?

WCAG measures relative luminance, not colour saturation. Bright yellow and orange have high luminance close to white, producing a low ratio that becomes hard to read in glare or for users with low contrast sensitivity.

Can I check colours from an existing screenshot or logo?

Yes — open the image in our Image Color Picker to copy the exact HEX codes of the text and background pixels, then paste them here.