Color Contrast Checker

Check color contrast ratios for web accessibility compliance and WCAG standards

Colors

#000000
#ffffff

Color Presets

Contrast Results

21.00:1
Contrast Ratio
AAA
WCAG Grade

Preview

Sample Heading

This is sample text to preview how the colors work together. The contrast ratio determines how readable this text is against the background.

Small text (under 18pt) requires higher contrast ratios for accessibility compliance.

Normal Text
18pt and below
Large Text
18pt+ or 14pt+ bold

Accessibility Compliance

WCAG AA Normal Text(4.5:1)

Minimum contrast for normal text (under 18pt)

WCAG AA Large Text(3:1)

Minimum contrast for large text (18pt+ or 14pt+ bold)

WCAG AAA Normal Text(7:1)

Enhanced contrast for normal text

WCAG AAA Large Text(4.5:1)

Enhanced contrast for large text

Accessibility Recommendations

• This combination meets WCAG AAA standards for enhanced accessibility.

Frequently Asked Questions

What is a color contrast checker?

A color contrast checker is a tool that calculates the contrast ratio between foreground (text) and background colors. It helps determine if your color combinations meet WCAG (Web Content Accessibility Guidelines) standards, ensuring your website is readable for users with visual impairments or color blindness.

What are WCAG AA and AAA standards?

WCAG AA requires a minimum contrast ratio of 4.5:1 for normal text and 3:1 for large text (18pt+ or 14pt+ bold). WCAG AAA is the enhanced level requiring 7:1 for normal text and 4.5:1 for large text. AA is the generally accepted standard for web accessibility, while AAA provides even better accessibility for users with low vision.

How is the contrast ratio calculated?

The contrast ratio is calculated using the relative luminance values of the foreground and background colors. The formula is (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color's luminance and L2 is the darker color's luminance. The result ranges from 1:1 (no contrast, same color) to 21:1 (maximum contrast, black and white).

What contrast ratio should I aim for?

For normal text (under 18pt), aim for at least 4.5:1 to meet WCAG AA standards, or 7:1 for AAA standards. For large text (18pt+ or 14pt+ bold), the minimums are 3:1 for AA and 4.5:1 for AAA. Higher ratios provide better readability for all users, especially those with visual impairments.

Can I test my own custom colors?

Yes! Click on the foreground or background color swatches to open the color picker. You can select any color visually or enter hex codes directly. The contrast ratio and WCAG compliance results update instantly as you change colors. You can also use the swap button to exchange foreground and background colors, or generate random color pairs for testing.

What are the color presets for?

The color presets provide common color combinations used in web design: High Contrast (black/white), Dark Theme, Blue Theme, Green Theme, Warning colors, and Error colors. These presets let you quickly test standard design patterns and see how they perform against accessibility standards.

Why does my color combination fail the test?

A color combination fails when the contrast ratio is below the required threshold. Common issues include using similar shades, low-saturation colors, or pastel combinations. To improve contrast, try using darker text on light backgrounds or lighter text on dark backgrounds. The tool provides specific recommendations based on your current ratio.

Do I need to pass all four compliance tests?

Not necessarily. For most websites, meeting WCAG AA standards (passing the AA Normal Text and AA Large Text tests) is sufficient and legally required in many jurisdictions. AAA standards are stricter and optional, providing enhanced accessibility. Choose based on your audience's needs and accessibility requirements.