yellow-400
#fcc800Tailwind CSS v4.3.3 yellow-400 is oklch(85.2% 0.199 91.936) in OKLCH, the format Tailwind uses, and #fcc800 in HEX.
- Class
- OKLCH
- HEX
- RGB
- HSL
- CSS
Classes
Click to copy. Add /50 for 50% opacity, for example bg-yellow-400/50.
Text on yellow-400
- Aawhite1.57:1Hard to read
- Aablack13.38:1Readable · AA
- Aayellow-9509.28:1Readable · AA
Most readable text from the yellow scale: yellow-950
Tailwind yellow scale
Step 400 in other Tailwind colors
Questions and answers
What is the hex code of Tailwind yellow-400?
yellow-400 is #fcc800 in HEX, rgb(252 200 0) in RGB and oklch(85.2% 0.199 91.936) in OKLCH. Tailwind CSS v4.3.3 defines its colors in OKLCH, so the HEX value is the closest sRGB match.
Is Tailwind yellow-400 accessible for text?
White text on yellow-400 has a contrast ratio of 1.57:1 and black text 13.38:1. WCAG AA needs 4.5:1 for normal text and 3:1 for large text, so black text is the better choice here.
How do I use yellow-400 in Tailwind CSS?
Add bg-yellow-400, text-yellow-400 or border-yellow-400 to an element. In your own CSS use var(--color-yellow-400), the CSS variable Tailwind v4 creates for every color.