Color Contrast Checker

Test your color combinations against WCAG accessibility standards.

Accessibility Preview

This is how your text looks on the background.

Contrast Ratio
21:1
Grade
Excellent (AAA)

Normal Text

WCAG AA (4.5:1)
PASS
WCAG AAA (7.0:1)
PASS

Large Text (18pt+)

WCAG AA (3.0:1)
PASS
WCAG AAA (4.5:1)
PASS

Ensure Accessible Designs

Don't guess if your text is readable. Use our contrast checker to verify compliant color combinations for inclusive web design.

Accessibility (a11y)

How this Color Contrast Checker works

This accessibility compliance tool evaluates color contrast ratios between foreground text and background colors, determining whether combinations meet WCAG (Web Content Accessibility Guidelines) standards for readability by users with visual impairments. The checker calculates relative luminance for each color, applies the WCAG contrast ratio formula: (L1 + 0.05) / (L2 + 0.05) where L1 is lighter color and L2 is darker, then compares results against minimum thresholds: 4.5:1 for normal text AA compliance, 7:1 for AAA compliance, and reduced requirements for large text over 18pt or bold 14pt.

Luminance calculation converts RGB values through gamma correction and weighted channel summation reflecting human eye sensitivity where green contributes most to perceived brightness: L = 0.2126×R + 0.7152×G + 0.0722×B, with RGB values first linearized from sRGB's gamma-encoded representation. The mathematical rigor ensures objective accessibility measurement matching how visually impaired users experience contrast, particularly those with low vision, cataracts, or age-related contrast sensitivity loss.

The interface accepts colors via hex codes, RGB values, or color picker inputs, immediately calculating contrast ratios and displaying pass/fail indicators for each WCAG level (A, AA, AAA) across normal and large text categories. Visual previews render sample text in foreground/background combinations enabling subjective verification alongside numerical compliance. Recommendations suggest alternative colors maintaining aesthetic intent while improving ratios when failures occur. Common applications include auditing website accessibility before launch, comparing marketing materials for inclusivity, validating UI component libraries against accessibility standards, or designing presentations ensuring projection visibility. Advanced features support batch checking entire color palettes against background options, generating accessible color variations, or exporting compliance reports documenting accessibility due diligence. All calculations execute client-side, maintaining privacy for proprietary brand colors under development.

How to use this Color Contrast Checker

1

Colors

Enter background and foreground colors.

2

Check

See if the contrast ratio passes WCAG AA and AAA.

3

Adjust

Tweak colors to improve readability.

Frequently Asked Questions

What is a good contrast ratio?
WCAG AA requires 4.5:1 for normal text. AAA requires 7:1.
Why is contrast important?
Good contrast ensures text is readable for users with visual impairments.

Related Tools

The Color Contrast Checker is maintained by CodeItBro. We aim to provide the best free developer tools on the web. If you have feedback or suggestions, please visit our contact page.

Featured on

CodeItBro - Free dev tools + practical guides to help you ship faster | Product HuntCodeItBro - Free Online Developer Tools badgeCodeItBro badge