Skip to main content

bg-yellow-500

Tailwind Yellow 500

#EAB308·Yellow family·Shade 500

Color Values

HEX
#EAB308
RGB
rgb(234, 179, 8)
HSL
hsl(45, 93%, 47%)
OKLCH
oklch(0.795 0.162 86)
CMYK
cmyk(0%, 24%, 97%, 8%)
CSS Variable
var(--color-yellow-500)
Tailwind Class
bg-yellow-500

Accessibility Score

60/100

Good

Based on WCAG 2.1 contrast ratios against white and black backgrounds.

On White

1.92:1

Fail

On Black

10.95:1

AAA
Test in Contrast Checker →

Tailwind Usage — All Utilities

Background

bg-yellow-500

Text

text-yellow-500

Border

border-yellow-500

Ring

ring-yellow-500

Outline

outline-yellow-500

Fill

fill-yellow-500

Stroke

stroke-yellow-500

From (gradient)

from-yellow-500

Via (gradient)

via-yellow-500

To (gradient)

to-yellow-500

Placeholder

placeholder-yellow-500

Caret

caret-yellow-500

Accent

accent-yellow-500

Decoration

decoration-yellow-500

Shadow Color

shadow-yellow-500

Tailwind v3 Config (extend custom color)

// tailwind.config.js module.exports = { theme: { extend: { colors: { 'yellow-500': '#eab308', }, }, }, };

CSS Equivalent

/* Hex */
background-color: #EAB308;

/* RGB */
background-color: rgb(234, 179, 8);

/* HSL */
background-color: hsl(45, 93%, 47%);

/* OKLCH (CSS Color Level 4) */
background-color: oklch(0.795 0.162 86);

/* CSS Custom Property (Tailwind v4) */
background-color: var(--color-yellow-500);

/* Gradient example */
background: linear-gradient(135deg, #fefce8 0%, #ca8a04 100%);

OKLCH — Modern Color Space

Lightness (L)

0.795

80% perceived brightness

Chroma (C)

0.162

Color intensity / saturation

Hue (H)

86°

Angle on perceptual hue wheel

oklch(0.795 0.162 86)

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

Primary brand color

Shade 500 of the Yellow palette

Recommended Uses

  • CTA buttons
  • Active navigation links
  • Primary brand accents
  • Interactive element fills
  • Highlighted badges

Avoid

Text on dark/black backgrounds — check contrast before use.

Preview

On White

Aa Bb Cc

On Black

Aa Bb Cc

As Background

Aa Bb Cc — #EAB308

Frequently Asked Questions

What is the hex code for Tailwind Yellow 500?
Tailwind Yellow 500 has the hex code #EAB308. Its RGB value is rgb(234, 179, 8) and its HSL value is hsl(45, 93%, 47%).
What Tailwind utility classes use Yellow 500?
Use bg-yellow-500 for backgrounds, text-yellow-500 for text color, border-yellow-500 for borders, and ring-yellow-500 for focus rings. In Tailwind v4 the CSS variable var(--color-yellow-500) is available natively.
Is Tailwind Yellow 500 WCAG accessible?
Tailwind Yellow 500 achieves a 1.92:1 contrast ratio on white (Fail) and 10.95:1 on black (AAA). Its overall accessibility score is 60/100 (Good).
What is the OKLCH value for Tailwind Yellow 500?
Tailwind Yellow 500 in OKLCH is oklch(0.795 0.162 86) — lightness 0.795, chroma 0.162, hue 86°. OKLCH is a perceptually uniform space supported natively in modern CSS via the `color()` function.
What is Tailwind Yellow 500 used for?
At shade 500, Tailwind Yellow 500 is best described as "Primary brand color". Recommended uses: CTA buttons, Active navigation links, Primary brand accents.