🌗

Color Contrast Checker (WCAG)

Software · 2 inputs · Free

🌗

Color Contrast Checker (WCAG)

2 inputs

Parameters

What is this tool?

Color Contrast Checker (WCAG) helps developers with encoding, encryption and text processing. Calculates the contrast ratio between a text color and a background color using the WCAG 2.x relative luminance formula, and shows whether it passes AA and AAA for normal text, large text and UI components. Accepts #rgb, #rrggbb, rgb(r, g, b) and basic color names.

📘 Common mistakes · Worked example
Text colorBackground color

Calculates the contrast ratio between a text color and a background color using the WCAG 2.x relative luminance formula, and shows whether it passes AA and AAA for normal text, large text and UI components. Accepts #rgb, #rrggbb, rgb(r, g, b) and basic color names.

The result is not exact or binding and is for information only; it is not an official document and cannot be used in official procedures. Confirm it with the competent authority or a professional before acting; no liability is accepted for losses arising from its use.

Last reviewed: · Methodology and sources

How is it calculated?

Calculates the contrast ratio between a text color and a background color using the WCAG 2.x relative luminance formula, and shows whether it passes AA and AAA for normal text, large text and UI components. Accepts #rgb, #rrggbb, rgb(r, g, b) and basic color names.

Inputs

ValueUnitExample
Text color—#1a1a1a
Background color—#ffffff

What is this tool?

Color Contrast Checker (WCAG) helps developers with encoding, encryption and text processing. Calculates the contrast ratio between a text color and a background color using the WCAG 2.x relative luminance formula, and shows whether it passes AA and AAA for normal text, large text and UI components. Accepts #rgb, #rrggbb, rgb(r, g, b) and basic color names.

Common mistakes

  • Rounding 4.48 up to 4.5. WCAG thresholds apply to the unrounded value, so a ratio that displays as 4.50:1 but is really 4.499 still fails. The tool bases its verdict on the unrounded ratio.
  • Checking body text only. Link colors, placeholder text, hover and focus states, error messages and button labels are subject to the same thresholds.
  • Entering a semi-transparent color as if it were solid. rgba(0, 0, 0, 0.6) is not a color on its own; work out the blended result (#666666 on white) and check that.
  • Measuring a single point of text placed over an image or gradient. Check the lightest and the darkest area the text crosses; the worst value decides.
  • Treating any bold text as “large text”. The 3:1 threshold applies to bold text only from 14 pt (about 18.7 px) upward.
  • Forgetting icons, form field borders and chart lines. They are not text, but they need at least 3:1 against the adjacent color.

📘 How to Calculate Color Contrast Ratio (WCAG AA and AAA) →

Sources

Key terms

Text colorBackground color

Frequently Asked Questions

+Color Contrast Checker (WCAG) — how is it calculated?

Calculates the contrast ratio between a text color and a background color using the WCAG 2.x relative luminance formula, and shows whether it passes AA and AAA for normal text, large text and UI components. Accepts #rgb, #rrggbb, rgb(r, g, b) and basic color names.

+Which values are required?

Text color, Background color.

+Is my data stored?

No. All calculations run in your browser; the values you enter are never sent to or stored on a server. If you press “Save”, the calculation stays only in your own browser and you can delete it at any time.

+Is it free?

Yes, all tools are free and require no sign-up.

Similar tools

Popular Tools

🧮

Free Calculators in One Place

Tax, finance, health, math and more — 500+ tools, all in one place.

Choose your cookie preference to continue

Records the site needs to work (theme, language, favourites) stay in your browser.

This site is free and funded by ads.

With your consent, Google Analytics cookies measure visits and Google AdSense cookies are used to show ads; the data is processed on Google servers abroad.

If you reject, the site works just the same.

Cookie Policy · KVKK notice