WCAG Color Contrast Checker

Enter a text and background colour to get the exact WCAG contrast ratio, pass/fail for every level, an APCA score and one-click fixes that keep your hue.

Runs in your browser
Examples:
–
UseMinimumAAAAA
Normal text
below 24px, or below 18.66px bold
4.5:1 · 7:1
Large text
24px+, or 18.66px+ bold
3:1 · 4.5:1
UI components & graphics
icons, input borders, focus indicators
3:1—
APCA (WCAG 3 draft): Lc –
Large text — 24px regular
Large bold text — 18.66px bold

Normal body text at 16px. The quick brown fox jumps over the lazy dog, and readable contrast helps everyone in bright sunlight.

Small print at 13px is where low contrast hurts most.

ButtonInput border

Nearest passing colours

Each suggestion keeps the hue and saturation and changes only the lightness, by the smallest amount that reaches the target.

AdjustSuggestionRatio

Your data never leaves your computer. All processing happens 100% locally in your browser.

How to use the Contrast Checker

  1. Enter the text colour and the background colour (HEX, rgb(), hsl(), oklch() or a CSS name), or use the colour pickers.
  2. Read the contrast ratio and the AA/AAA results for normal text, large text and UI components.
  3. Check the live preview — headings, body copy, small print, a button and an input border.
  4. If a level fails, click Use next to the nearest passing colour to apply it, then copy the new HEX into your CSS.

What is a colour contrast ratio?

The contrast ratio compares the relative luminance of two colours on a scale from 1:1 (identical) to 21:1 (black on white). The Web Content Accessibility Guidelines (WCAG) use it to decide whether text is readable for people with low vision or colour-vision deficiencies — and for anyone reading a phone in bright light. It is also a legal benchmark: accessibility laws such as the European Accessibility Act and the ADA are commonly assessed against WCAG 2.x level AA.

WCAG 2.2 contrast requirements

CriterionLevelNormal textLarge text
1.4.3 Contrast (Minimum)AA4.5:13:1
1.4.6 Contrast (Enhanced)AAA7:14.5:1
1.4.11 Non-text ContrastAA3:1 for UI component boundaries, focus indicators and meaningful icons/graphics

Large text means at least 18 pt (24 px) regular or 14 pt (≈18.66 px) bold. Logos, purely decorative text and the text of disabled controls are exempt.

How the ratio is calculated

Each sRGB channel is linearised (values ≤ 0.04045 are divided by 12.92, others use ((c + 0.055) / 1.055)2.4), then combined into relative luminance: L = 0.2126 R + 0.7152 G + 0.0722 B. The ratio is (Llighter + 0.05) / (Ldarker + 0.05). Thresholds are strict: #777777 on white is 4.47:1 and fails AA, while #767676 reaches 4.54:1 and passes. That’s why this checker truncates rather than rounds the displayed ratio. Semi-transparent text is first blended onto the background, exactly as the browser would paint it.

What is APCA?

The Accessible Perceptual Contrast Algorithm (APCA) is the candidate contrast method for the future WCAG 3. It reports a lightness contrast value Lc from roughly 0 to 106 (negative for light text on dark backgrounds) and accounts for polarity — light-on-dark and dark-on-light are not perceived equally. As a guide, Lc 90 is preferred for body text, Lc 75 is the minimum for body text and Lc 60 for other content text. APCA is still a draft, so meet WCAG 2.x for compliance today and use APCA as a second opinion, especially for dark themes.

Fixing a failing pair

The suggestions table finds the closest colour that passes by changing only the HSL lightness of either the text or the background, so your brand hue survives. For darker or lighter variants of a brand colour, generate a full tint and shade scale with the Color Converter and test pairs here. In Webflow, the Designer’s Vision preview simulates colour-vision deficiencies, but it doesn’t show a ratio — check the exact numbers here before you publish.

Tools that pair well with the Contrast Checker

  • CSS Gradient Generator — Design a gradient visually — drag colour stops, change the angle or type, start from a preset — and copy production-ready CSS with a solid fallback colour.
  • Image Alt Checker — Audit every image on a page in one table: alt text status, file size, width/height attributes, format and lazy loading — with filters and CSV export.
  • Box Shadow Generator — Stack multiple shadow layers, tweak offsets, blur, spread and opacity on a live card, then copy the box-shadow or text-shadow CSS.
  • CSS Variables to Tailwind — Turn your :root colour variables into a Tailwind theme in one paste — Tailwind v3 tailwind.config.js or v4 @theme, with literal values or var() references.

Frequently asked questions

What contrast ratio do I need to pass WCAG AA?
At least 4.5:1 for normal text and 3:1 for large text (24px, or 18.66px bold). User-interface components and meaningful graphics such as icons and input borders also need 3:1 under WCAG 2.1/2.2 criterion 1.4.11.
Does 4.49:1 round up to 4.5:1?
No. WCAG thresholds are exact minimums, so a ratio of 4.499:1 fails AA. This checker truncates the displayed ratio to two decimals to avoid showing a misleading “4.5:1” for a failing pair.
Do disabled buttons, placeholders and logos need enough contrast?
Logos and the text of inactive (disabled) controls are exempt from 1.4.3. Placeholder text is not exempt if it conveys information, so it should meet 4.5:1 — or don’t rely on placeholders as labels.
What is APCA and will it replace the WCAG 2 contrast ratio?
APCA is the perceptual contrast method proposed for WCAG 3. It is more accurate for dark mode and thin fonts, but WCAG 3 is still a draft, so WCAG 2.x ratios remain the requirement for audits and legal compliance.
How do I check contrast for text on a gradient or image?
Measure the lightest (for dark text) or darkest (for light text) area behind the text — that’s the worst case. If it fails, add a solid or semi-transparent overlay behind the text and test the blended colour.

Related tools