ToolsKit

Color Contrast Checker

Check WCAG color contrast ratios.

Measure the contrast ratio between foreground and background colors and compare it with common WCAG thresholds.

Loading the interactive tool… This page needs JavaScript to run the Color Contrast Checker.

How to use Color Contrast Checker

  1. Paste the data, code, token, or value you need to inspect.
  2. Set any format, encoding, or validation options.
  3. Run the tool and inspect the result or diagnostic output.
  4. Copy the output into your terminal, editor, API client, or project.

How Color Contrast Checker works

Enter a foreground and a background color as hex codes and the tool calculates the WCAG contrast ratio from their relative luminance, rounded to two decimals. It then reports Pass or Fail for AA normal text at 4.5, AA large text at 3 and AAA normal text at 7. It checks the two colors only and does not account for font weight, size in context or transparency.

Worked example

Input: foreground #777777 on background #ffffff → Output: Contrast ratio 4.48:1, AA normal text Fail, AA large text Pass, AAA normal text Fail.

Common uses

  • Verify that body text in a design meets accessibility guidelines.
  • Pick a darker gray for placeholder text that still passes AA.
  • Document contrast results for an accessibility review.

Best for

  • accessible UI checks
  • design handoff reviews
  • website text contrast testing

Tips for better results

  • Validate the output before using it in production code.
  • Treat tokens, credentials, and secrets as sensitive even when processing happens locally.
  • For large payloads, keep an original copy so you can compare changes.

Frequently asked questions

What contrast ratio is required?

WCAG AA needs 4.5:1 for normal text and 3:1 for large text; AAA needs 7:1 and 4.5:1.

What counts as large text?

18pt (24px) or 14pt bold (about 19px) and above.

Does contrast affect SEO?

Indirectly. Accessible sites tend to have better engagement and are favoured by quality guidelines.

Related tools

Explore tool categories