Contrast Checker

Check color contrast ratios against WCAG 2.1 guidelines instantly. Ensure your text is readable and your design is accessible to everyone. Free and easy to use.

Advertisement
Advertisement

A contrast checker evaluates the readability of text against a background color by calculating the WCAG (Web Content Accessibility Guidelines) contrast ratio. The ratio ranges from 1:1 (no contrast) to 21:1 (maximum contrast between black and white). WCAG 2.1 requires at least 4.5:1 for normal text and 3:1 for large text. This tool computes ratios using the official W3C formula, entirely in your browser.

Ensure your colors meet WCAG accessibility standards

Real-time contrast ratio calculation with AA and AAA pass/fail indicators. Live text preview, instant HEX input, and copy-ready values — all in your browser.

WCAG 2.1 compliant
Live preview
Free unlimited

How to use

  1. 1

    Enter Colors

    Input the HEX codes for text and background colors.

  2. 2

    View Preview

    See how your text looks in real-time.

  3. 3

    Check Ratio

    Review the calculated contrast ratio.

  4. 4

    Verify Compliance

    Check if it passes WCAG AA/AAA standards.

Why Accessibility Matters

Reach a Wider Audience

Make your content usable for the 1 in 12 men and 1 in 200 women with color vision deficiency, as well as those with low vision.

Improve UX for All

Good contrast improves readability for everyone, especially on dim screens or in bright sunlight.

WCAG 2.1 & 2.2

Checks against both AA and AAA conformance levels, with clear pass/fail indicators for normal and large text.

Legal Compliance

Helps you meet accessibility requirements under the ADA, EAA, and Section 508.

Advertisement

Understanding Color Contrast and Accessibility

WCAG contrast requirements explained

The Web Content Accessibility Guidelines (WCAG) 2.1, published by the W3C, define minimum contrast ratios to ensure text is readable by people with visual impairments. The guidelines specify three conformance levels: A (minimum), AA (standard), and AAA (enhanced). For Level AA, the requirements are 4.5:1 for normal text (below 18pt or 14pt bold) and 3:1 for large text (18pt+ or 14pt+ bold). For Level AAA, the requirements are stricter: 7:1 for normal text and 4.5:1 for large text.

The contrast ratio is calculated using the relative luminance of the two colors. Relative luminance is a weighted sum of the linearized RGB channels: L = 0.2126*R + 0.7152*G + 0.0722*B, where R, G, and B are gamma-corrected values (each channel is linearized by applying: if c <= 0.03928 then c/12.92 else ((c+0.055)/1.055)^2.4). The contrast ratio is then (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color and L2 is the darker color. The 0.05 offset accounts for ambient light flare on the screen.

These requirements are not arbitrary -- they're based on extensive research on human vision. About 8% of men and 0.5% of women have some form of color vision deficiency (color blindness). Low contrast affects not only these users but also anyone viewing a screen in bright sunlight, on a low-quality display, or at an angle. Meeting WCAG AA contrast requirements improves readability for everyone, not just users with disabilities. In many jurisdictions (EU, US ADA), WCAG compliance is a legal requirement for public-facing websites.

Advertisement

Common contrast mistakes and how to fix them

The most common contrast mistake is using light gray text on a white background. A common design trend uses #999 or #AAA gray text for secondary information, but these colors have contrast ratios of 2.85:1 and 2.32:1 respectively -- well below the 4.5:1 minimum. For secondary text on white, use #767676 (4.54:1) or darker. Another common issue is using brand colors that look good visually but fail contrast checks -- a brand's light blue (#00BFFF) on white has a ratio of 2.32:1, failing WCAG AA. Darken brand colors for text use or use them only for non-text elements (borders, backgrounds, icons).

For large text (headings, buttons), the 3:1 requirement is more forgiving, but don't abuse it. Large text that barely passes 3:1 is still hard to read for many users. Aim for 4.5:1 whenever possible, regardless of text size. When using colored backgrounds, test both the text color and any text that might appear on hover or focus states. CSS custom properties (variables) make it easier to maintain consistent contrast -- define your color palette with contrast-tested pairs and reuse them throughout your design system.

Advertisement

Understanding WCAG Ratings

Level AA (Standard)

Requires 4.5:1 for normal text, 3:1 for large text. The standard goal for most websites.

Level AAA (Enhanced)

Requires 7:1 for normal text, 4.5:1 for large text. Enhanced accessibility for users with significant vision loss.

How does this compare to other contrast checkers?

A side-by-side comparison of popular WCAG contrast checking tools.

FeatureNovaToolsWebAIMContrast-Ratio.com
WCAG 2.1 AA + AAABoth levels
Live preview as you typeInstantSubmit
HEX + RGB inputBothHEX onlyHEX only
Color picker integrationEyeDropper
Large text threshold18pt / 14pt bold
Privacy (no server)100% local

Our contrast checker uses the exact W3C luminance formula and runs entirely in your browser. All calculations are instant -- no server roundtrips, no page reloads, no tracking of your color choices.

FAQ

What is color contrast and why is it important?
Color contrast is the difference in luminance (brightness) between a foreground color and its background. High contrast ensures that people with visual impairments — including color blindness, low vision, and age-related vision changes — can perceive your content effectively. The Web Content Accessibility Guidelines (WCAG) 2.1 define specific contrast ratio requirements that web content must meet to be considered accessible. Failing to meet these requirements not only excludes up to 15% of users from accessing your content but can also result in legal liability under accessibility laws like the ADA (Americans with Disabilities Act) in the US and the EAA (European Accessibility Act) in the EU.
What contrast ratio do I need to pass WCAG?
WCAG 2.1 defines two conformance levels. Level AA (the standard for most websites) requires a contrast ratio of at least 4.5:1 for normal text (below 18pt or 14pt bold) and 3:1 for large text (18pt+ or 14pt+ bold). Level AAA (enhanced, for critical content) requires 7:1 for normal text and 4.5:1 for large text. Non-text elements (icons, borders, charts) need at least 3:1 contrast against adjacent colors. Our tool calculates the exact ratio and shows pass/fail for each level, so you know exactly where your color combination stands.
Are logos required to meet these standards?
No. The WCAG guidelines provide explicit exceptions for text that is part of a logo or brand name, as well as text that is purely decorative or part of an inactive UI component. This means your brand colors do not need to meet contrast requirements when used in logos. However, any text that conveys information — including navigation labels, button text, form labels, and body copy — must meet the contrast requirements regardless of brand guidelines. If your brand colors don't meet WCAG contrast, consider using a darker or lighter variant for text while keeping the original color for decorative elements.
How can I fix a low contrast ratio?
Increase the difference in luminance between the text and background. The most effective approach is to make the light color lighter or the dark color darker. For example, if your text is `#666666` on a white background (contrast ratio 5.7:1, passes AA), but you want to use a lighter gray for aesthetic reasons, you can darken the background instead. Our tool's live preview lets you experiment with different HEX values and see the contrast ratio update in real time. A general rule: pure black on pure white gives the maximum contrast ratio of 21:1. Any deviation from black/white reduces the ratio.
How is the contrast ratio calculated?
The contrast ratio is calculated using the WCAG 2.1 formula, which uses relative luminance values. First, the relative luminance (L) of each color is calculated using a formula that accounts for the non-linear response of the human eye to different color channels (a gamma correction of approximately 2.2). Then the contrast ratio is (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color and L2 is the darker color. The +0.05 accounts for ambient light flare. The result ranges from 1:1 (no contrast) to 21:1 (maximum contrast, black on white). Our tool performs this calculation instantly as you type.
What is the difference between WCAG 2.1 and WCAG 2.2?
WCAG 2.2, published in October 2023, adds a few new success criteria but does not change the contrast requirements from WCAG 2.1. The contrast ratios (4.5:1 for normal text, 3:1 for large text at Level AA) remain the same. WCAG 2.2 does add a requirement for 'focus visible' (2.4.11) which means focus indicators must have at least 3:1 contrast against adjacent colors. Our tool checks against the WCAG 2.1 contrast criteria, which are identical to WCAG 2.2 for contrast purposes. If you pass WCAG 2.1 contrast, you also pass WCAG 2.2 contrast.
Does this tool check for color blindness accessibility?
This tool specifically checks luminance contrast, which is the WCAG requirement. Color blindness (more accurately, color vision deficiency) is a separate concern — it affects the ability to distinguish between colors, not brightness. However, meeting WCAG contrast requirements significantly helps users with color vision deficiency, because higher luminance contrast makes it easier to distinguish text from background regardless of hue. For full color blindness accessibility, never rely on color alone to convey information — always provide a text label, icon, or pattern as well.
Is my color data sent to a server?
No. All contrast calculations happen entirely in your browser using JavaScript. The HEX values you enter are processed locally by the browser's JavaScript engine — they are never transmitted to our servers, stored in a database, or shared with third parties. The tool does not use cookies, local storage, or session storage to persist your color choices. There are no analytics scripts tracking which colors you test. This makes the tool safe to use for proprietary brand colors, confidential design systems, or client work where color choices should not be exposed to third parties.

100% Private and Secure

This contrast checker runs entirely in your browser using standard JavaScript math and the WCAG 2.

  • 1 luminance formula.
  • No color values, HEX codes, or usage patterns are ever transmitted to our servers, stored in a database, or shared with third parties.
  • The tool does not require an account, does not use cookies to persist your color choices, and does not employ analytics scripts to track your testing activity.
  • All calculations — including relative luminance computation and contrast ratio derivation — are performed locally in your browser's JavaScript engine.
  • When you close the browser tab, all entered colors and results are cleared from memory immediately.
  • This makes the tool safe to use for proprietary brand colors, confidential design systems, client mockups, and any scenario where color choices should not be exposed to third-party servers.
  • The tool also works offline after the initial page load.

You might also like

Helpful guides

Advertisement