Web
Check text colour contrast for your website
Choose two solid colours to measure their contrast ratio. Preview the combination and see the normal and large text thresholds.
Preview your text
Body text should remain readable against its background.
Contrast ratio: 15.68:1
AA normal text: Pass (4.5:1)
AA large text: Pass (3:1)
AAA normal text: Pass (7:1)
AAA large text: Pass (4.5:1)
Pass/fail uses the unrounded ratio. Large text means at least 24 CSS pixels, or about 18.67 pixels when bold. Solid, opaque colours only; gradients, images and transparency need separate evaluation.
Example task
Compare a foreground text colour and background colour against WCAG contrast thresholds, then test the actual interface in context.
How this works
Enter six-digit HEX values or use the colour pickers. Swap foreground and background to compare a light and dark treatment for the same design. All calculations happen in your browser.
The checker converts sRGB channels to relative luminance and compares the lighter and darker values. It uses the full ratio for pass/fail, so a displayed rounded value does not incorrectly pass a threshold.
Use the result when selecting text colours for headings, buttons and paragraphs. Also review font size, weight, focus indicators and the actual background behind text. A passing pair does not certify an entire website.
Official source: W3C: contrast minimum.
Questions
What contrast ratio should body text have?+–
WCAG AA uses 4.5:1 for normal text and 3:1 for large text. AAA text thresholds are 7:1 and 4.5:1 respectively. Exceptions and context still matter.
Does it work with transparent colours?+–
This version accepts opaque six-digit HEX colours. For transparent text or backgrounds, first determine the final composited colours.
Does this check my whole website?+–
No. It measures one colour pair. It does not inspect pages, images, gradients, focus states or every accessibility requirement.
