FREE ONLINE TOOLCode & data

Color contrast checker

Check the contrast ratio between text and background colors

Compare foreground and background colors using the WCAG contrast-ratio calculation. A practical starting point when reviewing text legibility.

  • No account needed
  • Practical guide included
  • Clear data boundaries
Color contrast checker
Private by design

Preparing your workspace…

Color contrast checker features and uses

Compare a specific foreground/background pair before choosing text colors. The calculated ratio addresses one aspect of legibility and should accompany wider accessibility testing.

Test the actual foreground and background combination used by the interface, including meaningful hover and focus states. A passing color ratio covers one accessibility criterion; readable text sizes, keyboard interaction and other criteria need separate review.

Continue this task with Image color palette and English readability estimator.

Common uses

  • Review body text colors
  • Check button label contrast
  • Compare design token pairs

How to use this tool

Follow these steps to prepare your input, run the tool and review its output.

  1. Enter actual hex colors

    Enter foreground and background hex colors. Use the rendered foreground and background values, not a rough screenshot estimate.

  2. Calculate the ratio

    Calculate the contrast ratio. Review normal and large-text thresholds separately.

  3. Recheck real states

    Review the thresholds and adjust the colors. Inspect hover, focus, disabled states and any transparency or background image in the actual interface.

Example input and output

Illustrative color contrast checker example

Illustrative example
Starting input
Foreground #000000; background #ffffff.
What to look for
A contrast ratio of 21:1 for that opaque pair.

Demonstration only. This is a mathematical color-pair example, not a full interface accessibility result.

How to interpret the results

Passing color contrast does not establish keyboard access, labeling or meaningful focus indicators.

The effective background can vary when gradients, opacity or images are involved.

Before you use the result

  • Ignoring the real background beneath text.
  • Applying large-text thresholds to small labels.
  • Calling one passing ratio a complete accessibility certification.

Frequently asked questions

Answers about using this tool, interpreting its results and how it handles your data.

How we handle your data
Does this inspect text on my live page?

No. You enter the foreground and background values to calculate their pairwise ratio.

Why do normal and large text have different thresholds?

The referenced contrast guidance distinguishes text size and weight; use the relevant threshold for the actual element.

What about text over an image?

Check representative effective backgrounds and the actual composition; one solid-color pair cannot describe every pixel.

What accessibility issues remain outside contrast?

Contrast is only one part of accessibility. Font size, weight, focus indicators, content and interaction design need their own review.

Is this tool free, and do I need to sign up?

This tool is free to use without an account or subscription. Supply your input in the workspace on this page, then run the tool. Your browser needs to support the features used by the tool; keep an original copy and review any generated output before applying it to a live website.

Are my files or text uploaded to your server?

This tool processes the supplied input locally in your browser. It does not upload your files or text to our server for processing. Copy or download the result you want to keep; the tool does not publish changes to your website automatically.