Free tools that run in your browser. Use any tool without an account.

Favourites Cart
Sign in
Join free

Color Contrast Checker

  • Free
  • Runs in your browser
  • No account needed

You get a live WCAG 2.2 contrast ratio and pass/fail rows. Type foreground and background hexes; results update instantly. Black (#000000) on white (#ffffff) is 21:1 and passes AA and AAA.

Contrast ratio
14.67:1
AA normal text (needs 4.5:1)
Pass
AA large text (needs 3:1)
Pass
AAA normal text (needs 7:1)
Pass
AAA large text (needs 4.5:1)
Pass
Icons and borders (needs 3:1)
Pass
Text luminance
0.0215
Background luminance
1

Large text means at least 24 px (18 pt) regular or 18.66 px (14 pt) bold. A see-through text colour is mixed with the background first, and a see-through background is mixed with white.

Runs in your browser. Your files and values are not sent to us. Report a problem
Advertisement

About the Color Contrast Checker

This tool checks one text colour against one background colour in your browser; nothing is uploaded. Designers, developers and accessibility auditors use it to test buttons, icons, text and graphics. It follows WCAG 2.2's contrast method and shows the ratio from 1:1 to 21:1. You get pass/fail for AA normal (4.5:1), AA large (3:1), AAA normal (7:1), AAA large (4.5:1) and icons and borders (3:1). The tool also shows text and background relative luminance, the closest colours that pass AA and AAA, and whether your colours are mixed correctly when they use transparency. Results update as you type; there is no calculate button. You can copy results or create a shareable link that reopens with the same colours.

How to use it

  1. 1Enter the text colour (hex or use the picker)
  2. 2Enter the background colour (hex or use the picker)
  3. 3Optionally set alpha for see-through colours; they mix with the background and white as specified
  4. 4Copy the result or share the link to reopen with the same colours
Advertisement

Worked example

Input: Text colour #000000, Background colour #ffffff. Result: Contrast ratio 21:1. AA normal text passes (needs 4.5:1). AA large text passes (needs 3:1). AAA normal passes (needs 7:1). AAA large passes (needs 4.5:1). Icons and borders pass (needs 3:1). Closest AA and AAA passing text colour: #000000. Text luminance: 0.0000. Background luminance: 1.0000.

How it works

Method used: WCAG 2.2: each colour is turned into relative luminance L = 0.2126 R + 0.7152 G + 0.0722 B, where each sRGB channel (0 to 1) is linearised as c / 12.92 if c <= 0.04045, otherwise ((c + 0.055) / 1.055) ^ 2.4Contrast ratio = (L lighter + 0.05) / (L darker + 0.05), from 1:1 to 21:1Success criterion 1.4.3 (AA) needs 4.5:1 for normal text and 3:1 for large text; 1.4.6 (AAA) needs 7:1 and 4.5:1; 1.4.11 needs 3:1 for icons, borders and controlsThe ratio is cut, not rounded, so 4.49:1 failsLarge text means at least 24 px (18 pt) regular or 18.66 px (14 pt) boldA see-through text colour is mixed with the background first, and a see-through background is mixed with whiteResults update instantly as the visitor types; there is no calculate buttonVisitors can copy the result and share a link that reopens with their numbers

Source: W3C WCAG 2.1 contrast and relative luminanceWebAIM Contrast Checker (reference). Last checked 12 November 2026.

What it is good for

  • Live WCAG 2.2 contrast ratio and pass/fail for AA and AAA
  • Shows closest passing colours and exact luminance values
  • Runs entirely in your browser, so nothing is uploaded
  • Checks one foreground/background pair at a time and does not scan whole pages
Advertisement

Questions people ask

What ratio do I need for accessible text?

For WCAG AA you need at least 4.5:1 for normal text and 3:1 for large text. For AAA you need 7:1 for normal text and 4.5:1 for large text.

How does the tool handle transparency or see-through colours?

If a colour has alpha the tool first mixes the see-through text with the background colour. If the background is see-through it mixes with white. The effective visible colour is then measured.

What does the ratio number mean?

Ratio is (lighter luminance + 0.05) divided by (darker luminance + 0.05). Values run from 1:1 to 21:1. Higher numbers mean stronger contrast.

Are results exact or rounded?

The tool cuts the ratio, it does not round. Any value below the threshold fails. For example 4.49:1 fails AA normal because it is below 4.5:1.

Can I check icons and borders with this tool?

Yes. The tool shows the non-text contrast result for icons, borders and controls against the 3:1 requirement from WCAG 2.2 success criterion 1.4.11.

Is data sent to a server or stored remotely?

No. All calculations run in your browser and nothing you type is uploaded. You can copy results or create a shareable link that encodes your colours in the URL.

Help keep every tool free

FreeToolr stays free because people help it grow. Share a tool you like, tell us what to build next, or support us on Ko-fi.

Advertisement
Advertisement