freesabai

Developer tools

Colour contrast checker (WCAG)

Check whether a text colour and a background colour differ enough to be read, by the WCAG 2 standard: AA and AAA for normal text, large text and UI components. See a live sample, and if it fails you are shown the nearest text colour that passes. It runs in your browser.

This tool needs JavaScript. If you still see this after a few seconds, JavaScript is switched off in your browser or the page did not load completely: turn JavaScript on or reload the page.

How to use it

  1. Enter the text colour and the background colour (HEX, rgb(), hsl() or a name), or pick them with the colour boxes. The ratio appears at once.
  2. Read the pass or fail of each criterion, and the sample of real text on that background.
  3. If it fails, press "Use this colour" on a suggestion (the same hue as yours, with only the lightness changed).

Frequently asked questions

What is the difference between AA and AAA?

They are levels of WCAG 2, the web accessibility guidelines. AA is the level most laws and standards ask for: normal text needs at least 4.5:1 and large text 3:1. AAA is stricter: 7:1 for normal text and 4.5:1 for large text.

How big is "large" text?

WCAG counts text as large from 24 px (18 pt) up, or from 18.66 px (14 pt) up if it is bold. Smaller text must meet the normal text criteria.

Why is a ratio slightly different from another tool's?

This tool cuts decimals off rather than rounding up, so 4.499 never becomes 4.50 and looks like a pass. The pass or fail verdict is always worked out from the exact value.

Good to know

Your data stays on your device

Everything runs in your browser. What you type, paste or open is not sent to freesabai's servers or anyone else's, and is not kept in the browser: close the page and it is gone. The site only counts how many times this page was opened and how many times someone copied or saved a result (never what was pasted or the result, and you can switch the counting off in the footer; see the privacy policy).

Report a problem or suggest an idea

Found a bug, or want this tool to do more? Tell us on the feedback page. No sign-up.

Other developer tools

JSON and data

Encoding, hashes and tokens

Generators

Time, numbers and colour

Text and code