Tailwind pink colours
The eleven pink shades in the default Tailwind CSS palette, with the contrast figures that decide which of them you can actually put text on.
Every pink shade
| Class | Hex | RGB | On white | Text colour | As text |
|---|---|---|---|---|---|
pink-50 | #FDF2F8 | 253, 242, 248 | 1.09:1 | black | — |
pink-100 | #FCE7F3 | 252, 231, 243 | 1.18:1 | black | — |
pink-200 | #FBCFE8 | 251, 207, 232 | 1.38:1 | black | — |
pink-300 | #F9A8D4 | 249, 168, 212 | 1.81:1 | black | — |
pink-400 | #F472B6 | 244, 114, 182 | 2.65:1 | black | — |
pink-500 | #EC4899 | 236, 72, 153 | 3.53:1 | black | large only |
pink-600 | #DB2777 | 219, 39, 119 | 4.6:1 | white | AA |
pink-700 | #BE185D | 190, 24, 93 | 6.04:1 | white | AA |
pink-800 | #9D174D | 157, 23, 77 | 7.88:1 | white | AA |
pink-900 | #831843 | 131, 24, 67 | 9.65:1 | white | AA |
pink-950 | #500724 | 80, 7, 36 | 15.03: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
pink-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 pink in Tailwind
<div class="bg-pink-500 text-black">
<p class="text-pink-600">
The text class above is the lightest pink that still passes AA on a white background.
Frequently asked questions
What is the hex code for Tailwind pink-500?
#EC4899 — RGB 236, 72, 153. Full values and contrast for #EC4899.
Which Tailwind pink shades can I use for text?
pink-600, pink-700, pink-800, pink-900, pink-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 pink background be black or white?
Black up to pink-500, white from pink-600 down. The two are never both comfortable: at the crossover neither reaches 4.5:1.