CColor Contrast Checker
Web Accessibility · Free browser tool

Color Contrast Checker

Calculate the contrast ratio between two hex colors. Check foreground and background contrast while designing interfaces. Enter 3- or 6-digit hex colors; also test real components, focus states, and the relevant accessibility requirements.

Use the tool

Enter your values, then run it. The result is generated in your browser.

How to use Color Contrast Checker

  1. Enter foreground and background colors.
  2. Compare with the applicable threshold.
  3. Test hover, focus, disabled, and error states in the real interface.

Formula and assumptions

Convert sRGB channels to relative luminance. Contrast ratio = (lighter luminance + 0.05) ÷ (darker luminance + 0.05).

This is a numeric contrast aid, not a complete accessibility audit.

This is a free planning tool. For consequential decisions, verify the inputs and use relevant product instructions, specifications, or professional advice.

Frequently asked questions

What ratio is used for normal text?

A common WCAG AA target is 4.5:1 for normal text.

What about large text?

A common WCAG AA target is 3:1.

Does passing guarantee accessibility?

No, other accessibility requirements remain.

About this tool

Check foreground and background contrast while designing interfaces. Enter 3- or 6-digit hex colors; also test real components, focus states, and the relevant accessibility requirements.

No account is required. The tool runs in this browser and this starter build has no form-submission backend. See the method and assumptions before relying on estimates.