Color Contrast Checker for Tailwind CSS
Pick any two Tailwind colors, see real-time WCAG 2.1 contrast ratios for AA and AAA compliance, and copy the class names straight into your code.
Foreground (Text)
Showing Tailwind CSS colors
Background
Showing Tailwind CSS colors
Contrast Ratio
17.85:1
The quick brown fox
jumps over the lazy dog
WCAG AA
WCAG AAA
Copy Classes
WCAG 2.1 at a Glance
Normal Text
Body copy, labels, paragraphs (< 18pt)
Large Text
Headings, 18pt+ regular or 14pt+ bold
UI Components
Borders, icons, focus indicators, controls
Quick Tailwind Tip
Use shades 700-950 on backgrounds 50-200 for body text. text-gray-900 on white gives you ~17.4:1.
Approximately 8% of men and 0.5% of women worldwide experience some form of colour vision deficiency — designing for contrast benefits everyone.
Frequently Asked Questions
Common questions about color contrast ratios, WCAG compliance, and checking contrast in Tailwind CSS.
Why use a color contrast checker for Tailwind CSS?
Tailwind ships with a beautiful color palette, but not every combination meets WCAG 2.1 accessibility standards. A foreground and background pair that looks fine on your monitor can be unreadable for the roughly 300 million people worldwide with some form of color vision deficiency. A quick color contrast check catches these issues before they ship.
This free color contrast checker lets you pick any two Tailwind CSS colors, instantly calculates the contrast ratio, and tells you whether the pair passes AA or AAA for normal text, large text, and UI components. No sign-up, no ads, works entirely in your browser.
How to use the results
Once you find a passing combination, click the copy button to grab the Tailwind utility classes (e.g. text-slate-900 bg-white) and paste them straight into your JSX, Vue template, or HTML. If a pair fails, try moving one shade darker or lighter until you hit the threshold.
Quick rules of thumb
- Body text: use shades 700-950 on backgrounds 50-200 for easy AA compliance.
- Buttons and interactive elements only need a 3:1 ratio against their surrounding area.
- Decorative or disabled elements are exempt from contrast requirements.
- Dark mode needs the same checks. Flip your foreground and background and test again.
Ship accessible UIs faster
Our starter kits are WCAG-AA compliant out of the box. Contrast-checked, keyboard-tested, screen-reader verified.