Do my text and background colours pass WCAG contrast?
Pick a text colour and a background colour. The checker shows the contrast ratio and whether it passes WCAG level AA (4.5:1, or 3:1 for large text) and AAA (7:1, or 4.5:1 for large text). If it fails, it suggests the nearest text colour of the same hue that passes, with CSS to copy.
Last checked: 28 Nov 2026
Large text: 24 px
Bold text: 19 px bold
Normal text: the quick brown fox reads your caption.
How to use it
- Choose the text colour and the background colour, or paste hex codes.
- Read the ratio and the AA and AAA results for normal and large text.
- If it fails, press Use it to try the suggested colour.
- Copy the CSS.
How it works
WCAG 2.2 defines the contrast ratio as (L1 + 0.05) / (L2 + 0.05), where L1 and L2 are the relative luminance of the lighter and darker colour. Level AA asks for at least 4.5:1 for normal text and 3:1 for large text; level AAA asks for 7:1 and 4.5:1. Large text means at least 18 point, or 14 point bold (about 24 px and 18.5 px). The suggestion keeps the hue and mixes the text colour towards black or white until the ratio is reached.
Nothing leaves your device. Your files and the details you type are processed by your own browser. Nothing is uploaded, there is no sign-up and no watermark.
Sources
Last checked: 28 Nov 2026
Questions
What counts as large text?
WCAG calls text large from 18 point, or 14 point bold. The W3C notes this is about 24 px and 18.5 px.
Do logos need to pass?
No. WCAG says text that is part of a logo or brand name has no contrast requirement.
Why is the ratio rounded down?
So that a pair is never shown as passing when it is just below the line.