Tailwind lime colours
The eleven lime shades in the default Tailwind CSS palette, with the contrast figures that decide which of them you can actually put text on.
Every lime shade
| Class | Hex | RGB | On white | Text colour | As text |
|---|---|---|---|---|---|
lime-50 | #F7FEE7 | 247, 254, 231 | 1.04:1 | black | — |
lime-100 | #ECFCCB | 236, 252, 203 | 1.09:1 | black | — |
lime-200 | #D9F99D | 217, 249, 157 | 1.17:1 | black | — |
lime-300 | #BEF264 | 190, 242, 100 | 1.31:1 | black | — |
lime-400 | #A3E635 | 163, 230, 53 | 1.51:1 | black | — |
lime-500 | #84CC16 | 132, 204, 22 | 1.98:1 | black | — |
lime-600 | #65A30D | 101, 163, 13 | 3.09:1 | black | large only |
lime-700 | #4D7C0F | 77, 124, 15 | 4.99:1 | white | AA |
lime-800 | #3F6212 | 63, 98, 18 | 7.08:1 | white | AA |
lime-900 | #365314 | 54, 83, 20 | 8.73:1 | white | AA |
lime-950 | #1A2E05 | 26, 46, 5 | 14.61: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
lime-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 lime in Tailwind
<div class="bg-lime-500 text-black">
<p class="text-lime-700">
The text class above is the lightest lime that still passes AA on a white background.
Frequently asked questions
What is the hex code for Tailwind lime-500?
#84CC16 — RGB 132, 204, 22. Full values and contrast for #84CC16.
Which Tailwind lime shades can I use for text?
lime-700, lime-800, lime-900, lime-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 lime background be black or white?
Black up to lime-600, white from lime-700 down. The two are never both comfortable: at the crossover neither reaches 4.5:1.