Toolman

Tailwind green colours

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

Every green shade

ClassHexRGBOn whiteText colourAs text
green-50#F0FDF4240, 253, 2441.05:1black
green-100#DCFCE7220, 252, 2311.1:1black
green-200#BBF7D0187, 247, 2081.21:1black
green-300#86EFAC134, 239, 1721.4:1black
green-400#4ADE8074, 222, 1281.74:1black
green-500#22C55E34, 197, 942.28:1black
green-600#16A34A22, 163, 743.3:1blacklarge only
green-700#15803D21, 128, 615.02:1whiteAA
green-800#16653422, 101, 527.13:1whiteAA
green-900#14532D20, 83, 459.11:1whiteAA
green-950#052E165, 46, 2214.91: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

green-700 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 green in Tailwind

<div class="bg-green-500 text-black">
<p class="text-green-700">

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

Frequently asked questions

What is the hex code for Tailwind green-500?

#22C55E — RGB 34, 197, 94. Full values and contrast for #22C55E.

Which Tailwind green shades can I use for text?

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

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

All Tailwind colours · Colour reference