Tailwind neutral colours
The eleven neutral shades in the default Tailwind CSS palette, with the contrast figures that decide which of them you can actually put text on.
Every neutral shade
| Class | Hex | RGB | On white | Text colour | As text |
|---|---|---|---|---|---|
neutral-50 | #FAFAFA | 250, 250, 250 | 1.04:1 | black | — |
neutral-100 | #F5F5F5 | 245, 245, 245 | 1.09:1 | black | — |
neutral-200 | #E5E5E5 | 229, 229, 229 | 1.26:1 | black | — |
neutral-300 | #D4D4D4 | 212, 212, 212 | 1.48:1 | black | — |
neutral-400 | #A3A3A3 | 163, 163, 163 | 2.52:1 | black | — |
neutral-500 | #737373 | 115, 115, 115 | 4.74:1 | white | AA |
neutral-600 | #525252 | 82, 82, 82 | 7.81:1 | white | AA |
neutral-700 | #404040 | 64, 64, 64 | 10.37:1 | white | AA |
neutral-800 | #262626 | 38, 38, 38 | 15.13:1 | white | AA |
neutral-900 | #171717 | 23, 23, 23 | 17.93:1 | white | AA |
neutral-950 | #0A0A0A | 10, 10, 10 | 19.8: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
neutral-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 neutral in Tailwind
<div class="bg-neutral-500 text-white">
<p class="text-neutral-500">
The text class above is the lightest neutral that still passes AA on a white background.
Frequently asked questions
What is the hex code for Tailwind neutral-500?
#737373 — RGB 115, 115, 115. Full values and contrast for #737373.
Which Tailwind neutral shades can I use for text?
neutral-500, neutral-600, neutral-700, neutral-800, neutral-900, neutral-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 neutral background be black or white?
Black up to neutral-400, white from neutral-500 down. The two are never both comfortable: at the crossover neither reaches 4.5:1.