Toolman

Tailwind purple colours

The eleven purple shades in the default Tailwind CSS palette, with the contrast figures that decide which of them you can actually put text on.

Every purple shade

ClassHexRGBOn whiteText colourAs text
purple-50#FAF5FF250, 245, 2551.07:1black
purple-100#F3E8FF243, 232, 2551.18:1black
purple-200#E9D5FF233, 213, 2551.36:1black
purple-300#D8B4FE216, 180, 2541.77:1black
purple-400#C084FC192, 132, 2522.64:1black
purple-500#A855F7168, 85, 2473.96:1blacklarge only
purple-600#9333EA147, 51, 2345.38:1whiteAA
purple-700#7E22CE126, 34, 2066.98:1whiteAA
purple-800#6B21A8107, 33, 1688.72:1whiteAA
purple-900#581C8788, 28, 13510.88:1whiteAA
purple-950#3B076459, 7, 10015: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

purple-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 purple in Tailwind

<div class="bg-purple-500 text-black">
<p class="text-purple-600">

The text class above is the lightest purple that still passes AA on a white background.

Frequently asked questions

What is the hex code for Tailwind purple-500?

#A855F7 — RGB 168, 85, 247. Full values and contrast for #A855F7.

Which Tailwind purple shades can I use for text?

purple-600, purple-700, purple-800, purple-900, purple-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 purple background be black or white?

Black up to purple-500, white from purple-600 down. The two are never both comfortable: at the crossover neither reaches 4.5:1.

All Tailwind colours · Colour reference