Interfaces and CSSRuns in your browser

WCAG HEX Color Contrast Checker

Compare text and background colors, get the numeric ratio, and check AA and AAA text thresholds.

  • 3- or 6-digit HEX
  • WCAG text thresholds
  • Live preview
Online tool

Try the tool

Add your data, choose the settings, and get the result.

Input

Result

Text sample

17.74:1

  • AA normal text: ✓
  • AA large text: ✓
  • AAA normal text: ✓

Processing in your browser

Text and selected files are processed in the current browser and are not sent to a server to produce the result.

Reviewed: 2026-07-17
01

How to use it

  1. 1

    Enter text and background colors in HEX.

  2. 2

    Run the contrast calculation.

  3. 3

    Review AA and AAA results for normal and large text.

02

What the tool can do

  • Three- and six-digit HEX values with or without #.
  • Relative luminance and contrast-ratio calculation.
  • AA checks for normal and large text and an AAA check for normal text.
03

Common use cases

  • Checking button text against its background.
  • Selecting an accessible color pair for an interface.
  • Quickly checking a design token before implementation.
04

How it works inside

A 1:1 ratio means equal luminance; the maximum contrast is 21:1.

Passing a numeric threshold does not replace checking states, text size, and the complete user experience.

05

Questions and answers

How can I check whether text is readable on its background?

Enter the final opaque text and background colours in HEX format. The tool calculates their contrast. The WCAG AA threshold for normal text is 4.5:1; check the actual colour pair used on your page.

Does sufficient contrast make a page accessible?

Contrast is one accessibility check. Also assess text size, page zoom, visible focus, and keyboard use. This tool evaluates the entered colours, not your site's entire interface.