{ Contrast Checker }

// check color contrast for wcag compliance

Free browser-based WCAG contrast checker. Instantly test foreground and background color combinations for AA and AAA compliance. No sign-up required.

or try a preset →
—
Contrast Ratio
134.5721
AA Normal text ≥ 4.5:1
—
AA Large text ≥ 3:1
—
AAA Normal text ≥ 7:1
—
AAA Large text ≥ 4.5:1
—
// LIVE PREVIEW

The quick brown fox jumps over the lazy dog.

This is normal body text at 16px. Good contrast ensures readability for all users, including those with low vision or color deficiency. WCAG AA requires a ratio of at least 4.5:1 for this text size.

Large text (18px+) needs only 3:1 for AA.

Sample Link Text
Badge Label Outlined
FOREGROUND — —
BACKGROUND — —

HOW TO USE

  1. 01
    Set your colors

    Click the swatch or type a HEX value for both foreground (text) and background colors.

  2. 02
    Read the results

    The contrast ratio and all four WCAG criteria update instantly as you adjust colors.

  3. 03
    Check the preview

    See how text, buttons, links, and inputs actually look at that contrast level in the live preview.

FEATURES

WCAG AA & AAA Live Preview Contrast Ratio Preset Pairs Swap Colors HEX Input

USE CASES

  • ♿ Accessibility audits for web projects
  • 🎨 Validating design system color tokens
  • 🖥️ Checking UI text on colored backgrounds
  • 📋 WCAG compliance reports

WHAT IS THIS?

A free browser-based WCAG contrast checker that calculates the contrast ratio between any two colors and instantly shows whether the combination passes WCAG 2.1 AA and AAA standards for both normal and large text. No server, no sign-up.

RELATED TOOLS

FREQUENTLY ASKED QUESTIONS

What is a WCAG contrast ratio?

The WCAG contrast ratio is a number between 1:1 (no contrast — identical colors) and 21:1 (maximum contrast — pure black on pure white). It is calculated using the relative luminance of the two colors. The higher the ratio, the more legible text is against its background.

What is the difference between WCAG AA and AAA?

WCAG AA is the standard compliance level required by most legal and regulatory guidelines. For normal body text it requires a 4.5:1 ratio; for large text (18px+ or bold 14px+), 3:1. WCAG AAA is the enhanced level, requiring 7:1 for normal text and 4.5:1 for large text. AAA is recommended for high-readability contexts like medical or government websites.

What counts as "large text" in WCAG?

WCAG defines large text as at least 18pt (24px) for regular weight, or at least 14pt (approximately 18.67px) for bold text. Large text has a lower contrast requirement because it is easier to read even at lower contrast due to its size.

How is contrast ratio calculated?

The ratio is calculated as (L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter color and L2 is that of the darker color. Relative luminance is computed from linearized sRGB values using the formula defined in WCAG 2.1 Success Criterion 1.4.3.

Does this tool check contrast for images or gradients?

No — this tool checks solid flat color combinations only. For images or gradients used as backgrounds, you should test the darkest and lightest areas separately against your text color to ensure the entire area meets requirements.

My ratio is close to the threshold — is it good enough?

Technically yes, if it meets the threshold. But ratios at the edge (e.g. 4.5:1 exactly) leave no room for rendering differences across monitors, operating system font smoothing, or CSS anti-aliasing. A safe margin of 10–20% above the minimum is recommended for production use.

What Is WCAG Color Contrast?

WCAG (Web Content Accessibility Guidelines) defines minimum contrast ratios to ensure that text is readable by people with low vision or color vision deficiency. The contrast ratio is a measure of how different two colors appear in terms of relative brightness — not simply how different they look to someone with typical color vision.

A contrast ratio of 1:1 means the two colors are identical. A ratio of 21:1 is the maximum, representing pure black on pure white. All ratios in between are calculated using a formula based on the relative luminance of each color as defined in the sRGB color space.

WCAG 2.1 Contrast Requirements

There are four criteria you need to be aware of, depending on your target compliance level:

Why Contrast Matters Beyond Accessibility

Color contrast affects everyone, not just users with disabilities. Poor contrast makes text harder to read in bright sunlight, on low-quality screens, or for users who have adjusted their display settings. High-contrast text also improves reading speed and reduces eye strain during extended use — benefits that apply to all users.

From a business perspective, many jurisdictions require WCAG compliance under accessibility laws — including the ADA in the United States, the EN 301 549 standard in the EU, and the Accessibility for Ontarians with Disabilities Act (AODA) in Canada. Failing to meet these standards can expose organizations to legal liability.

Tips for Passing Contrast Checks

If your color combination fails, here are practical approaches to fix it: darken the text color or lighten the background for light-mode designs; add a semi-transparent background behind text placed on images; use the HSL lightness channel — reduce it for text colors and increase it for backgrounds until the ratio passes. Avoid relying on color alone to convey meaning; always pair color with shape, pattern, or text labels for accessibility.

☕