Color Contrast Checker

Test text‑to‑background contrast against WCAG 2.1 accessibility standards. Enter hex codes or use the color pickers, and see pass/fail results instantly.

Aa Smaller sample text (14px) Preview
Contrast Ratio: 4.60

Normal Text

WCAG AA: PASS

WCAG AAA: FAIL

Large Text

WCAG AA: PASS

WCAG AAA: PASS

Large text is defined as 18px+ or 14px+ bold. WCAG AA requires 4.5:1 (normal) and 3:1 (large); AAA requires 7:1 and 4.5:1.

What is a Color Contrast Checker?

A color contrast checker is a tool that measures the luminance difference between two colors — typically a text (foreground) color and its background. The result is a contrast ratio, which indicates how readable the text is for people with visual impairments. The higher the ratio, the easier it is to distinguish the text. This tool instantly evaluates your chosen colors against the Web Content Accessibility Guidelines (WCAG) 2.1, the global standard for web accessibility. Whether you’re a web designer, UI/UX professional, or developer, ensuring proper contrast is essential for inclusive, user‑friendly interfaces.

How is Contrast Ratio Calculated?

Contrast ratio follows the formula defined by WCAG. It uses the relative luminance of each color. The steps are:

  1. Linearize each sRGB channel (Red, Green, Blue). For each channel value (0–255), if the sRGB value is ≤ 0.03928, the linear value is channel / 12.92; otherwise, it’s ((channel + 0.055) / 1.055) ^ 2.4.
  2. Calculate relative luminance (L) using the formula:
    L = 0.2126 * R + 0.7152 * G + 0.0722 * B (these coefficients account for human perception of different colors).
  3. Compute the contrast ratio:
    Contrast = (L1 + 0.05) / (L2 + 0.05), where L1 is the luminance of the lighter color and L2 is the luminance of the darker color.

The result is a number between 1:1 (no contrast) and 21:1 (maximum contrast, e.g., black on white).

Example Contrast Calculations

Here are a few common color combinations and their contrast ratios:

Use the tool above to instantly see how your own colors perform.

Why Use a Contrast Checker? (Benefits & Use Cases)

Checking color contrast isn't just about ticking a box — it directly impacts user experience and legal compliance.

Common use cases: Web designers checking brand palette combinations; app developers testing UI themes; content creators verifying text over images; accessibility auditors evaluating existing websites.

Frequently Asked Questions

What is the Color Contrast Checker?

It’s a free online tool that calculates the contrast ratio between two colors (usually text and background) and evaluates them against WCAG 2.1 accessibility levels AA and AAA.

How do I use the Color Contrast Checker?

Enter hex color codes in the text fields or use the color pickers. The tool instantly updates the preview, shows the contrast ratio, and marks WCAG AA/AAA pass/fail for normal and large text.

What contrast ratio is required for WCAG AA?

For normal text (less than 18pt or 14pt bold), the minimum ratio is 4.5:1. For large text (18pt+ or 14pt+ bold), the minimum is 3:1.

What contrast ratio is required for WCAG AAA?

For normal text, the enhanced AAA level requires a ratio of at least 7:1. For large text, the minimum is 4.5:1.

How is contrast ratio calculated?

The tool uses the WCAG relative luminance formula: each color is linearized, then luminance is computed. Contrast ratio = (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter luminance.

Does this tool check for color blindness?

No, this tool measures contrast, not color perception. For color blindness simulation, you would need a dedicated simulator. However, good contrast helps all users, including those with color vision deficiencies.

Is this tool free to use?

Yes, it’s completely free. No sign‑up, no ads, and no limitations. You can check as many color combinations as you need.

Do I need to install anything?

No. The Color Contrast Checker runs entirely in your browser. Just open the page and start testing colors.

Is my data safe?

Absolutely. All processing happens locally on your device. No color data is sent to any server, so your work stays private.

Can I use this on my phone or tablet?

Yes, the tool is fully responsive and works on iOS, Android, and all modern browsers. You can even add it to your home screen for quick access.

What is the difference between AA and AAA?

AA is the minimum acceptable level for accessibility, while AAA is the enhanced (highest) level. AAA contrast requirements are stricter, designed for users with more significant visual impairments.

Why is color contrast important?

Sufficient contrast makes text readable for people with low vision, color blindness, or other visual impairments. It also improves legibility in bright sunlight or on low‑quality screens.

If you’re working on visual design, you might find these other Nyxbo tools useful: