Tailwind zinc colours
The eleven zinc shades in the default Tailwind CSS palette, with the contrast figures that decide which of them you can actually put text on.
Every zinc shade
| Class | Hex | RGB | On white | Text colour | As text |
|---|---|---|---|---|---|
zinc-50 | #FAFAFA | 250, 250, 250 | 1.04:1 | black | — |
zinc-100 | #F4F4F5 | 244, 244, 245 | 1.1:1 | black | — |
zinc-200 | #E4E4E7 | 228, 228, 231 | 1.27:1 | black | — |
zinc-300 | #D4D4D8 | 212, 212, 216 | 1.48:1 | black | — |
zinc-400 | #A1A1AA | 161, 161, 170 | 2.56:1 | black | — |
zinc-500 | #71717A | 113, 113, 122 | 4.83:1 | white | AA |
zinc-600 | #52525B | 82, 82, 91 | 7.73:1 | white | AA |
zinc-700 | #3F3F46 | 63, 63, 70 | 10.44:1 | white | AA |
zinc-800 | #27272A | 39, 39, 42 | 14.89:1 | white | AA |
zinc-900 | #18181B | 24, 24, 27 | 17.72:1 | white | AA |
zinc-950 | #09090B | 9, 9, 11 | 19.9:1 | white | AA |
"On white" is the contrast ratio against a white page. "As text" is whether that ratio passes WCAG AA for normal text, which needs 4.5:1; large text needs only 3:1.
Where the scale turns over
zinc-500 is the lightest shade that reaches 4.5:1 against white, so it is the first one usable for body text on a white page. It is also where a background of this hue stops taking black text and starts needing white — the two thresholds are 4.5:1 and 4.58:1, and on this scale they fall on the same step.
Using zinc in Tailwind
<div class="bg-zinc-500 text-white">
<p class="text-zinc-500">
The text class above is the lightest zinc that still passes AA on a white background.
Frequently asked questions
What is the hex code for Tailwind zinc-500?
#71717A — RGB 113, 113, 122. Full values and contrast for #71717A.
Which Tailwind zinc shades can I use for text?
zinc-500, zinc-600, zinc-700, zinc-800, zinc-900, zinc-950 reach 4.5:1 against white and pass AA for normal text. Anything lighter fails, whatever it looks like on your monitor.
Should text on a zinc background be black or white?
Black up to zinc-400, white from zinc-500 down. The two are never both comfortable: at the crossover neither reaches 4.5:1.