Color Contrast Checker - WCAG Accessibility Contrast Ratio Free

Color Contrast Checker

Instantly verify WCAG AA & AAA contrast ratios between any two colors. Enter hex values, check accessibility compliance, and get improvement suggestions — all with a live preview.

Pick Colors
#1A1A2E
#
#E0E0E0
#
6.51
Contrast Ratio
AA Normal
≥ 4.5:1
AA Large
≥ 3.0:1
AAA Normal
≥ 7.0:1
AAA Large
≥ 4.5:1
Live Preview

Sample Heading

This is sample text to demonstrate how your color combination looks on screen. WCAG guidelines ensure readability for all users.

Small caption text — 12px or smaller
50%

What Is a Color Contrast Checker?

A color contrast checker is an accessibility tool that measures the difference in luminance between two colors — typically foreground text and its background — and expresses that difference as a contrast ratio. The Web Content Accessibility Guidelines (WCAG) define minimum contrast ratios to ensure content is readable by people with low vision, color blindness, or other visual impairments. Our free online contrast checker helps designers, developers, and content creators verify their color choices meet WCAG AA and AAA standards instantly.

Using a WCAG contrast ratio calculator like this one removes guesswork. Instead of relying on your monitor or subjective judgment, you get an objective ratio based on the relative luminance formula defined by the W3C. Enter two hex values, and the tool computes whether your combination passes the required thresholds for normal text, large text, and graphical elements.

Accessibility isn't optional — it's a fundamental part of inclusive design. Many countries have legal requirements for digital accessibility, and failing to meet WCAG standards can expose organizations to lawsuits. By integrating a color contrast validator into your workflow, you protect your users and your business.

Why Contrast Ratio Matters for Web Accessibility

Approximately 1 in 12 men and 1 in 200 women have some form of color vision deficiency. Additionally, age-related vision loss, screen glare, and environmental lighting all affect how users perceive content. A high-contrast ratio ensures that text remains legible under diverse conditions. The WCAG 2.1 guidelines specify three levels of conformance: A, AA, and AAA. Level AA is the most commonly targeted standard, requiring a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (18px bold or 24px regular). AAA conformance demands 7:1 for normal text and 4.5:1 for large text.

Our color contrast analyzer displays these thresholds as clear pass/fail badges so you can immediately see where your design stands. The live preview panel renders sample text in your chosen colors, giving you a realistic sense of how the combination will appear on screen. The lightness slider lets you quickly adjust the foreground value to find a passing variant without leaving the tool.

How Relative Luminance Is Calculated

The contrast ratio formula is derived from the sRGB color space. First, each 8-bit RGB channel (0–255) is converted to a linear value using the sRGB transfer function: if RsRGB ≤ 0.03928 then R = RsRGB / 12.92, otherwise R = ((RsRGB + 0.055) / 1.055) ^ 2.4. This is repeated for the green and blue channels. The relative luminance L is then computed as L = 0.2126 × R + 0.7152 × G + 0.0722 × B. Finally, the contrast ratio is (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter luminance and L2 is the darker. This ratio ranges from 1:1 (no contrast) to 21:1 (maximum contrast, e.g., black on white).

Our contrast ratio calculator performs all these calculations in real time as you type or pick colors, giving you instant feedback. This makes it an indispensable accessibility checker for anyone building websites, mobile apps, or digital products.

8-Step Guide: How to Use the Color Contrast Checker

1
Open the tool — Navigate to the Color Contrast Checker page. You'll see two color pickers labeled "Foreground" and "Background" along with a live preview area.
2
Pick your foreground color — Click the foreground color swatch or type a 6-character hex code (without the #) in the text field. The preview updates immediately.
3
Pick your background color — Use the background color picker or hex input to set the background against which your text will appear.
4
Read the contrast ratio — The large number at the top of the results panel shows your current contrast ratio. A green number means it passes AA for large text; red means it fails even that threshold.
5
Check WCAG badges — Four badges display pass/fail status for AA Normal, AA Large, AAA Normal, and AAA Large. Green checkmarks indicate passing; red X marks indicate failing.
6
Use the lightness slider — Drag the "Foreground Lightness" slider to brighten or darken the foreground color. This helps you quickly find a passing variant.
7
Swap colors — Click the swap button (double arrow) between the two pickers to exchange foreground and background values.
8
Try suggested colors — If your combination fails, the tool suggests adjusted foreground colors that pass. Click one to apply it instantly.

Web Accessibility: Why It Matters for Everyone

Web accessibility ensures that websites, tools, and technologies are designed and developed so that people with disabilities can use them. This includes visual, auditory, physical, speech, cognitive, and neurological disabilities. The Web Content Accessibility Guidelines (WCAG) are the international standard for accessibility, maintained by the World Wide Web Consortium (W3C).

The four core principles of WCAG are often summarized as POUR: Perceivable, Operable, Understandable, and Robust. Color contrast falls under the "Perceivable" principle — information and user interface components must be presentable to users in ways they can perceive. If text cannot be distinguished from its background, the content is effectively invisible to a significant portion of your audience.

Beyond compliance, accessible design benefits everyone. High-contrast text is easier to read on mobile devices in bright sunlight. Captions help users in noisy environments. Keyboard navigation supports power users and those with motor impairments. By adopting accessibility best practices, you improve the user experience for your entire audience while expanding your reach to the over one billion people worldwide who live with some form of disability.

Many organizations now mandate WCAG 2.1 Level AA compliance as a minimum standard. Governments, educational institutions, and large corporations often require accessibility as a contractual obligation. Using a contrast checker early in the design process saves time and reduces the risk of costly remediation later. Pair this tool with automated accessibility scanners and manual testing for a comprehensive approach.

Inclusive design is not just about checking boxes — it's about recognizing human diversity and designing products that work for as many people as possible. Every time you adjust a color to meet WCAG standards, you're making the web a more equitable place. Bookmark this WCAG contrast checker and make it a regular part of your development workflow.

Frequently Asked Questions

What is the WCAG contrast ratio?
The WCAG contrast ratio is a numeric value between 1:1 and 21:1 that represents the difference in luminance between two colors. WCAG 2.1 requires a minimum of 4.5:1 for normal text (Level AA) and 7:1 for enhanced contrast (Level AAA).
How is contrast ratio calculated?
Contrast ratio is calculated using relative luminance: L = 0.2126 × R + 0.7152 × G + 0.0722 × B, where RGB values are first linearized from sRGB. The contrast ratio is (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color's luminance.
What is the difference between AA and AAA contrast?
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. AAA is a higher standard that provides better readability for users with low vision.
What is large text in WCAG?
Large text is defined as 18 point (24px) or larger regular weight, or 14 point (18.66px) or larger bold weight. Large text has relaxed contrast requirements because it is easier to read.
Do I need to check contrast for images?
Yes. WCAG requires that text within images meets contrast requirements. Additionally, non-text content like icons and graphical objects that convey information must have a 3:1 contrast ratio against adjacent colors.
What hex format should I use?
Use 6-character hex codes (e.g., #FF5733). Shorthand 3-character codes (e.g., #F53) are also valid and work with this tool. Enter the value without the # symbol in the input field.
Can this tool check contrast for gradients?
This tool compares two solid colors. For gradients, check the contrast at multiple points along the gradient, especially where text overlaps. Use the foreground against the worst-case background point.
What is relative luminance?
Relative luminance is a measure of the perceived brightness of a color, normalized to 0 (black) to 1 (white). It accounts for the nonlinear sensitivity of human vision to different wavelengths of light.
Why is my contrast ratio failing AAA but passing AA?
AAA requires a higher ratio (7:1 for normal text) than AA (4.5:1). Your combination meets the AA threshold but falls short of AAA. Try darkening the foreground or lightening the background to improve the ratio.
Is color contrast checking required by law?
Many countries have accessibility laws (e.g., ADA in the US, EN 301 549 in the EU) that reference WCAG. While the law doesn't mandate specific ratios, following WCAG standards is the best way to demonstrate compliance.