Color Contrast Checker

Calculate contrast between two opaque sRGB colours and check WCAG AA/AAA text and UI contrast thresholds.

FreeNo accountIn your browser

  1. 1Add details
  2. 2Set options
  3. 3Review result

Loading Color Contrast Checker…

Your colours

WCAG

Options & actions

Input
Ready
Result
—

Checks two solid, opaque colours. Large text means at least 18pt regular or 14pt bold. A contrast pass does not establish complete WCAG compliance.

About this tool

Check whether text colours are easy to read

By
Updated

Check the contrast between two solid colours and see how the pair compares with WCAG text and non-text contrast thresholds. Choose a foreground and background, calculate their relative luminance ratio and inspect the sample text. The result includes separate pass or fail checks for normal text, large text and relevant interface components. This is useful when selecting a readable text colour or reviewing a design token pair, but it is one part of an accessibility review.

Step by step

How to use Color Contrast Checker

  1. Choose the Text / foreground colour using its colour control. Use the actual opaque sRGB colour from your design where possible. Depending on your browser, the native picker may let you enter a hexadecimal value directly.

  2. Choose the Background colour representing the solid surface directly behind the text or component. Do not substitute the general page background when the actual element sits on a differently coloured card, button or panel.

  3. Choose Check contrast to calculate the ratio and display the threshold table. Read the result for the kind of content you are checking, since normal text, large text and non-text interface components have different requirements.

  4. Inspect the sample text and use Swap colours to reverse foreground and background if useful. The numerical ratio stays the same when the colours are exchanged, although their practical appearance in your interface can feel different.

  5. Copy or download contrast-check.txt to record the colour values, ratio and threshold results. Adjust one colour and run the check again as needed. Finally, inspect the pair in the actual interface at its intended text size and weight.

Practical tasks

Options and tips for Color Contrast Checker

Read the text contrast thresholds correctly

WCAG AA requires at least 4.5:1 for normal text and 3:1 for large text. AAA uses 7:1 for normal text and 4.5:1 for large text. Large text means at least 18 point regular or 14 point bold, approximately 24 CSS pixels or 18.7 CSS pixels respectively. A heading label alone does not make text large. Apply the threshold to its actual rendered size and weight, and leave some practical margin instead of aiming at a barely passing boundary.

Check the actual adjacent colours

The ratio is calculated from the relative luminance of the two selected opaque sRGB colours. It does not evaluate transparency, a background photograph, a gradient or changing content behind text. For translucent elements, determine the final composited colours first. For variable backgrounds, examine the weakest relevant contrast across the area. The non-text 3:1 check applies to relevant visual information in interface components and graphics; it is not a rule that every decorative shape must pass.

Use contrast as part of a wider review

A passing pair can still be difficult to use when text is tiny, thin, crowded or displayed in a disabled-looking state. Contrast also does not check keyboard access, focus visibility, meaningful labels, reading order or whether colour is the only signal conveying information. Review hover, focus, selected and error states separately because they may use different pairs. The displayed ratio is rounded for readability, while the pass or fail decision uses the underlying calculated value.

A little help

Frequently asked questions

Why can a displayed 4.50:1 ratio still fail AA?

The displayed number is rounded to two decimal places. A value just below 4.5 can round to 4.50, while the check correctly uses the unrounded ratio. Adjust the colour until the pair passes with a small margin.

Does swapping foreground and background change contrast?

No. The luminance ratio uses the lighter and darker colour regardless of their roles, so reversing them gives the same number. Actual readability can still depend on the surrounding interface, font rendering, text weight and viewing conditions.

Can I test text over an image or gradient?

The tool accepts two solid opaque colours, so it cannot assess an entire variable background automatically. Sample representative final colours, including the weakest areas behind text, or add a consistent surface behind the text and check that pair.

Does a pass mean my page is WCAG compliant?

No. It means the selected pair meets a specific numerical contrast threshold. WCAG includes many other requirements, and some contrast rules have contextual exceptions. Review the actual component and the complete page rather than treating this result as certification.

Your next step

All image tools