Color Contrast Checker

Check the contrast ratio between two colors and see if it passes WCAG AA and AAA.

The Color Contrast Checker measures the contrast ratio between two colours and tells you whether it passes WCAG AA and AAA. It is a fast accessibility check for text and background pairings.

Text

What is Color Contrast?

Color contrast is the difference in brightness between a foreground element and its background. It's measured using a contrast ratio that ranges from 1:1 (no contrast) to 21:1 (maximum contrast). High contrast ensures text and interface elements are readable by people with various visual impairments, including color blindness and low vision conditions. The contrast ratio formula (L1 + 0.05) / (L2 + 0.05) calculates relative luminance, where L1 represents the lighter color and L2 the darker color. This ratio accounts for human perception of brightness and is based on the CIE 1931 color space standard. Colors that appear visually distinct to people with normal vision may have insufficient contrast for users with visual impairments, which is why objective measurement is crucial. For example, light gray on white may look acceptable on a bright screen but fail accessibility standards, potentially excluding millions of users from accessing your content effectively and legally.

The Web Content Accessibility Guidelines (WCAG) establish specific contrast ratio thresholds to make digital content more accessible. WCAG 2.1 requires a minimum ratio of 4.5:1 for normal text and 3:1 for large text (18pt+ or 14pt+ bold). Stricter AAA level requires 7:1 and 4.5:1 respectively. These standards help ensure your website works for everyone, including the 1 in 4 adults in the U.S. who have a disability. WCAG also differentiates between normal and large text to accommodate reading difficulties; people with low vision often need larger text sizes, so the contrast requirement is less strict for them. The guidelines apply to text and images of text, excluding decorative elements, logos, and incidental text. Compliance with these standards is not only a best practice for inclusivity but also increasingly required by law in many countries for public sector websites and commercial applications. Tools like ours help developers catch contrast issues before deployment, avoiding costly redesigns and potential legal liability.

Our contrast checker uses the official WCAG formula for relative luminance calculation. It compares your foreground and background colors, computes the ratio, and tells you exactly which accessibility levels are passed. This tool runs entirely in your browser with no data collection, giving you instant feedback while designing or auditing your website. The calculator converts RGB hex values to linear RGB, applies the WCAG luminance formula, and determines which contrast thresholds are met. The pass/fail badges appear in real-time as you adjust colors, providing immediate visual feedback. This immediate feedback loop is invaluable during the design phase when iterating on color schemes, allowing you to balance aesthetic preferences with accessibility requirements. Since the tool processes everything client-side, you can confidently test brand colors, client designs, or confidential projects without any privacy concerns.

How to use this Color Contrast Checker

FAQ

What is a contrast ratio?

Contrast ratio measures the difference in brightness between foreground and background colors. It's calculated using relative luminance with the formula (L1 + 0.05) / (L2 + 0.05) where L1 is the lighter color.

What are the WCAG levels?

WCAG AA requires 4.5:1 for normal text and 3:1 for large text. AAA requires 7:1 for normal text and 4.5:1 for large text. These thresholds ensure text is readable for users with visual impairments.

Are the colors I test uploaded or stored?

No, all contrast calculations happen entirely in your browser using client-side JavaScript. No color data is uploaded or stored.

Is this checker free?

Yes, completely free with no limits. You can check as many color combinations as you need.