Toolman

Tailwind amber colours

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

Every amber shade

ClassHexRGBOn whiteText colourAs text
amber-50#FFFBEB255, 251, 2351.04:1black
amber-100#FEF3C7254, 243, 1991.11:1black
amber-200#FDE68A253, 230, 1381.25:1black
amber-300#FCD34D252, 211, 771.44:1black
amber-400#FBBF24251, 191, 361.67:1black
amber-500#F59E0B245, 158, 112.15:1black
amber-600#D97706217, 119, 63.19:1blacklarge only
amber-700#B45309180, 83, 95.02:1whiteAA
amber-800#92400E146, 64, 147.09:1whiteAA
amber-900#78350F120, 53, 159.07:1whiteAA
amber-950#451A0369, 26, 314.98: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

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

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

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

Frequently asked questions

What is the hex code for Tailwind amber-500?

#F59E0B — RGB 245, 158, 11. Full values and contrast for #F59E0B.

Which Tailwind amber shades can I use for text?

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

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

All Tailwind colours · Colour reference