Skip to content
Developer Tools

Color Contrast Checker

Calculate the WCAG contrast ratio between two hexadecimal colors and check text-size thresholds.

Loading this local tool…

Data handling

Storage and export controls

Retention
The tool's working state is kept only while this page is open. Inputs and results are not saved to persistent storage by Got A Tool.
Export
The tool may prepare a result after you run it. It downloads or copies it only when you choose that action.

Advertising and analytics are separate site services. We do not send selected tool input to them. Read the Privacy Policy for details.

How it works

Color Contrast Checker: a practical guide

Text contrast affects how easily people can read foreground text against a background. This checker calculates the contrast ratio for two opaque hexadecimal sRGB colors and compares it with common WCAG 2.2 text thresholds: 4.5:1 for normal text and 3:1 for large text at AA, with stricter AAA thresholds.

  1. STEP 01

    Choose or enter a foreground hexadecimal color.

  2. STEP 02

    Choose or enter a background hexadecimal color.

  3. STEP 03

    Review the ratio and the separate AA and AAA results for normal and large text.

What this tool does and its limits

The calculation follows the WCAG relative-luminance method for sRGB colors. Large text generally means at least 18 point regular or 14 point bold. A passing ratio alone does not make a page accessible: text size, non-text controls, focus visibility, color use, and other requirements still need review. Transparent colors are not supported because the final background would be ambiguous.

Questions

Color Contrast Checker details

What does a contrast ratio such as 4.5:1 mean?

It compares the relative luminance of the lighter and darker colors. Higher ratios generally improve readability.

What counts as large text?

WCAG defines large text as at least 18 point regular or 14 point bold, approximately 24 px or 18.67 px respectively.

Does a passing result mean the page is accessible?

No. This checks only the selected color pair against text contrast thresholds; it does not audit the page or every accessibility criterion.

Can I check transparent colors?

This version accepts opaque 3- or 6-digit hexadecimal colors only.

Keep working