Color Contrast Checker
FREE TOOL

Color Contrast Checker

Real-time WCAG contrast ratio calculator with AA/AAA accessibility compliance checking. Make your designs accessible to everyone.

🔒 100% Client-side · Data never leaves your browser · Safe & Private
Color Contrast Live Preview
This is a sample body text to demonstrate the actual effect of foreground and background color pairing. Good contrast ensures all users can read content clearly.
Large Heading Sample (24px Bold)
Small Text Sample (12px) — for testing readability of small-size text
Button Sample
🖌️ Foreground Color (Text)
HEX
RGB
🎨 Background Color
HEX
RGB
Contrast Ratio
21.00
: 1
WCAG Compliance Status
AA
Normal Text
✓ Pass
Requires ≥ 4.5:1
AA
Large Text
✓ Pass
Requires ≥ 3:1
AAA
Normal Text
✓ Pass
Requires ≥ 7:1
AAA
Large Text
✓ Pass
Requires ≥ 4.5:1

📊 WCAG Contrast Ratio Formula

1. Relative Luminance L = 0.2126*R + 0.7152*G + 0.0722*B 2. Channel value: If RsRGB ≤ 0.03928, R = RsRGB/12.92, otherwise R = ((RsRGB+0.055)/1.055)^2.4 3. Contrast Ratio = (L_lighter + 0.05) / (L_darker + 0.05)

Related Tools

📖 WCAG Color Contrast Guide

What is WCAG Color Contrast?

WCAG (Web Content Accessibility Guidelines) is an international standard developed by W3C that defines minimum contrast ratio requirements between foreground and background colors. The contrast ratio ranges from 1:1 (no contrast) to 21:1 (maximum contrast between black and white). Higher ratios mean better readability. Good color contrast not only helps visually impaired and color-blind users read content, but also improves the reading experience for everyone in bright light environments.

WCAG Contrast Standards Overview

Level Text Type Minimum Contrast
AANormal text (<18pt or <14pt bold)4.5 : 1
AALarge text (≥18pt or ≥14pt bold)3 : 1
AAANormal text7 : 1
AAALarge text4.5 : 1
AAUI components and graphics (icons, borders, etc.)3 : 1

How to Improve Contrast?

Frequently Asked Questions

What is WCAG color contrast?

WCAG color contrast refers to the luminance difference ratio between foreground (text) and background colors, ranging from 1:1 to 21:1. It is a core metric defined in the W3C Web Content Accessibility Guidelines to measure text readability. Higher ratios mean text is easier to distinguish, which is more friendly to visually impaired and color-blind users.

What's the difference between AA and AAA standards?

AA is the basic WCAG compliance level, requiring normal text contrast of at least 4.5:1 and large text of at least 3:1. It is the minimum standard most websites should achieve. AAA is a stricter enhanced level, requiring normal text of at least 7:1 and large text of at least 4.5:1, suitable for scenarios with high accessibility requirements (such as government websites and healthcare platforms). AA is the recommended baseline target; AAA is not a universal requirement for all content.

What exactly counts as "large text"?

WCAG defines large text as: regular text with font size of at least 18pt (approximately 24px), or bold text with font size of at least 14pt (approximately 18.5px). Because large text has more area and thicker strokes, the contrast requirement is relatively lower, so the AA standard only requires 3:1 instead of 4.5:1.

Why is the AA standard for normal text 4.5:1?

The 4.5:1 value is based on research involving individuals with visual acuity of approximately 20/40 (about 0.5 vision). Studies show that when contrast reaches 4.5:1, users with 20/40 vision or better can generally read text content normally. This standard balances accessibility needs with design flexibility, and is the best practice value determined by W3C after extensive scientific validation.

How to fix non-compliant contrast?

The most direct approach is to adjust color luminance: if the text is too light, darken it (lower RGB values); if the background is too dark, lighten it (raise RGB values). This tool automatically recommends AA-compliant alternative colors when non-compliance is detected — just click to apply. Alternatively, you can try black-and-white combinations (21:1 maximum contrast) as a safe option, or use the "Random Colors" feature to explore compliant combinations.