Toolman

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

ClassHexRGBOn whiteText colourAs text
blue-50#EFF6FF239, 246, 2551.09:1black
blue-100#DBEAFE219, 234, 2541.22:1black
blue-200#BFDBFE191, 219, 2541.42:1black
blue-300#93C5FD147, 197, 2531.8:1black
blue-400#60A5FA96, 165, 2502.54:1black
blue-500#3B82F659, 130, 2463.68:1blacklarge only
blue-600#2563EB37, 99, 2355.17:1whiteAA
blue-700#1D4ED829, 78, 2166.7:1whiteAA
blue-800#1E40AF30, 64, 1758.72:1whiteAA
blue-900#1E3A8A30, 58, 13810.36:1whiteAA
blue-950#17255423, 37, 8414.69:1whiteAA

"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.

All Tailwind colours · Colour reference