Tailwind blue colours
The eleven blue shades in the default Tailwind CSS palette, with the contrast figures that decide which of them you can actually put text on.
Every blue shade
| Class | Hex | RGB | On white | Text colour | As text |
|---|---|---|---|---|---|
blue-50 | #EFF6FF | 239, 246, 255 | 1.09:1 | black | — |
blue-100 | #DBEAFE | 219, 234, 254 | 1.22:1 | black | — |
blue-200 | #BFDBFE | 191, 219, 254 | 1.42:1 | black | — |
blue-300 | #93C5FD | 147, 197, 253 | 1.8:1 | black | — |
blue-400 | #60A5FA | 96, 165, 250 | 2.54:1 | black | — |
blue-500 | #3B82F6 | 59, 130, 246 | 3.68:1 | black | large only |
blue-600 | #2563EB | 37, 99, 235 | 5.17:1 | white | AA |
blue-700 | #1D4ED8 | 29, 78, 216 | 6.7:1 | white | AA |
blue-800 | #1E40AF | 30, 64, 175 | 8.72:1 | white | AA |
blue-900 | #1E3A8A | 30, 58, 138 | 10.36:1 | white | AA |
blue-950 | #172554 | 23, 37, 84 | 14.69: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
blue-600 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 blue in Tailwind
<div class="bg-blue-500 text-black">
<p class="text-blue-600">
The text class above is the lightest blue that still passes AA on a white background.
Frequently asked questions
What is the hex code for Tailwind blue-500?
#3B82F6 — RGB 59, 130, 246. Full values and contrast for #3B82F6.
Which Tailwind blue shades can I use for text?
blue-600, blue-700, blue-800, blue-900, blue-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 blue background be black or white?
Black up to blue-500, white from blue-600 down. The two are never both comfortable: at the crossover neither reaches 4.5:1.