Color Values
- HEX
- #FACC15
- RGB
- rgb(250, 204, 21)
- HSL
- hsl(48, 96%, 53%)
- OKLCH
- oklch(0.861 0.173 92)
- CMYK
- cmyk(0%, 18%, 92%, 2%)
- CSS Variable
- var(--color-yellow-400)
- Tailwind Class
- bg-yellow-400
Accessibility Score
Good
Based on WCAG 2.1 contrast ratios against white and black backgrounds.
On White
1.53:1
On Black
13.71:1
Tailwind Usage — All Utilities
Background
bg-yellow-400Text
text-yellow-400Border
border-yellow-400Ring
ring-yellow-400Outline
outline-yellow-400Fill
fill-yellow-400Stroke
stroke-yellow-400From (gradient)
from-yellow-400Via (gradient)
via-yellow-400To (gradient)
to-yellow-400Placeholder
placeholder-yellow-400Caret
caret-yellow-400Accent
accent-yellow-400Decoration
decoration-yellow-400Shadow Color
shadow-yellow-400Tailwind v3 Config (extend custom color)
// tailwind.config.js
module.exports = {
theme: {
extend: {
colors: {
'yellow-400': '#facc15',
},
},
},
};CSS Equivalent
/* Hex */
background-color: #FACC15;
/* RGB */
background-color: rgb(250, 204, 21);
/* HSL */
background-color: hsl(48, 96%, 53%);
/* OKLCH (CSS Color Level 4) */
background-color: oklch(0.861 0.173 92);
/* CSS Custom Property (Tailwind v4) */
background-color: var(--color-yellow-400);
/* Gradient example */
background: linear-gradient(135deg, #fefce8 0%, #eab308 100%);OKLCH — Modern Color Space
Lightness (L)
0.861
86% perceived brightness
Chroma (C)
0.173
Color intensity / saturation
Hue (H)
92°
Angle on perceptual hue wheel
oklch(0.861 0.173 92)OKLCH is a perceptually uniform color space in CSS Color Level 4. Unlike HSL, equal steps in L produce equal perceived lightness changes — making it ideal for building accessible, harmonious design system scales.
Design Recommendations
Mid-tone accent
Shade 400 of the Yellow palette
Recommended Uses
- ✓Icon fills on white
- ✓Secondary buttons (large text)
- ✓Chart & data visualization bars
- ✓Decorative UI elements
Avoid
Preview
On White
Aa Bb Cc
On Black
Aa Bb Cc
As Background
Aa Bb Cc — #FACC15
Similar Tailwind Colors
Perceptually close shades from other Tailwind color families.
Nearest Named Color
Tailwind Yellow 400
Nearest Tailwind equivalent — #FACC15
Frequently Asked Questions
- What is the hex code for Tailwind Yellow 400?
- Tailwind Yellow 400 has the hex code #FACC15. Its RGB value is rgb(250, 204, 21) and its HSL value is hsl(48, 96%, 53%).
- What Tailwind utility classes use Yellow 400?
- Use bg-yellow-400 for backgrounds, text-yellow-400 for text color, border-yellow-400 for borders, and ring-yellow-400 for focus rings. In Tailwind v4 the CSS variable var(--color-yellow-400) is available natively.
- Is Tailwind Yellow 400 WCAG accessible?
- Tailwind Yellow 400 achieves a 1.53:1 contrast ratio on white (Fail) and 13.71:1 on black (AAA). Its overall accessibility score is 60/100 (Good).
- What is the OKLCH value for Tailwind Yellow 400?
- Tailwind Yellow 400 in OKLCH is oklch(0.861 0.173 92) — lightness 0.861, chroma 0.173, hue 92°. OKLCH is a perceptually uniform space supported natively in modern CSS via the `color()` function.
- What is Tailwind Yellow 400 used for?
- At shade 400, Tailwind Yellow 400 is best described as "Mid-tone accent". Recommended uses: Icon fills on white, Secondary buttons (large text), Chart & data visualization bars.