Skip to content

Tailwind CSS v4 default palette

Tailwind yellow-500: #EFB100

In Tailwind CSS v4, yellow-500 is defined as --color-yellow-500: oklch(79.5% 0.184 86.047), which is #EFB100 in hex and rgb(239, 177, 0): a light, vivid amber. In Tailwind v3, yellow-500 was #EAB308.

yellow-500#EFB100

In OKLCH, yellow-500 has a lightness of 79.5%, chroma 0.184 and hue 86.0°.

This OKLCH value lies outside sRGB. The hex #EFB100 is the sRGB fallback from the CSS Color 4 gamut mapping algorithm; on Display P3 screens browsers show a more saturated color, close to color(display-p3 0.9037 0.7031 0.0745).

In v3, yellow-500 was #EAB308. The v4 value is ΔE OK 2.2 away; v4 is more saturated.

Tailwind yellow has very high lightness through 400, so only the 700 and darker shades are suitable for text on white.

Color codes for yellow-500

Color codes for yellow-500
Tailwind v4 token--color-yellow-500
OKLCH (source value)oklch(79.5% 0.184 86.047)
HEX#EFB100
RGBrgb(239, 177, 0)
HSLhsl(44, 100%, 47%)
HWBhwb(44 0% 6%)
CMYK (naive, no ICC profile)cmyk(0%, 26%, 100%, 6%)
Decimal15,708,416
Display P3color(display-p3 0.9037 0.7031 0.0745)
Tailwind v3 hex#EAB308
Utility classesbg-yellow-500, text-yellow-500, border-yellow-500

Tailwind yellow scale

Contrast and accessibility

On yellow-500, black text has a contrast ratio of 10.95:1 and passes AAA at any text size; white text reaches 1.91:1.

WCAG 2.2 contrast ratios (success criteria 1.4.3 and 1.4.6: AA needs 4.5:1 for normal text and 3:1 for large text, AAA needs 7:1 and 4.5:1). APCA Lc is the lightness contrast from the APCA-W3 0.0.98G model proposed for WCAG 3; a higher absolute value is more readable, and Lc 75 is its suggested minimum for body text.

Contrast and accessibility
PairRatioAAAA largeAAAAAA largeAPCA Lc
Black text on yellow-50010.95:1PassPassPassPass67.6
White text on yellow-5001.91:1FailFailFailFail−40.6
Yellow-500 text on white1.91:1FailFailFailFail36.3
Yellow-500 text on black10.95:1PassPassPassPass−66.2

Tints and shades

Each step mixes var(--color-yellow-500) with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, var(--color-yellow-500), white 25%) in CSS.

Tints (mixed with white)

  1. 5%
    #f0b50d
  2. 15%
    #f1bd26
  3. 25%
    #f3c540
  4. 35%
    #f5cc59
  5. 45%
    #f6d473
  6. 55%
    #f8dc8c
  7. 65%
    #f9e4a6
  8. 75%
    #fbecbf
  9. 85%
    #fdf3d9
  10. 95%
    #fefbf2

Shades (mixed with black)

  1. 5%
    #e3a800
  2. 15%
    #cb9600
  3. 25%
    #b38500
  4. 35%
    #9b7300
  5. 45%
    #836100
  6. 55%
    #6c5000
  7. 65%
    #543e00
  8. 75%
    #3c2c00
  9. 85%
    #241b00
  10. 95%
    #0c0900

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, yellow-500's complementary color is #97BAFF (close to lightskyblue), its analogous colors are #FF9C42 and #B7C900, and its triadic partners are #00D7ED and #F78EFB. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#97baff
Analogous−30°, +30°#ff9c42#b7c900
Triadic+120°, +240°#00d7ed#f78efb
Split-complementary+150°, +210°#49c9ff#c5a8ff

Computed in OKLCH: the hue is rotated by 180° (complementary), ±30° (analogous), ±120° (triadic) and 180° ±30° (split-complementary) while lightness and chroma stay fixed. Results that fall outside sRGB are brought back with the CSS Color 4 gamut mapping algorithm. Because this uses OKLCH, the values differ from tools that rotate hue in HSL, but every color keeps the same perceived lightness.

Warm or cool?

Tailwind yellow-500 is a warm color: its hue is 44° on the HSL wheel, in the red, orange and yellow range (0° to about 70°, plus reds above 330°) that is conventionally called warm.

Nearest named and Tailwind colors

Distance is ΔE OK, the Euclidean distance in OKLab multiplied by 100. Values under about 2 are hard to tell apart side by side.

Nearest CSS named colors

Nearest CSS named colors
ColorHEXΔE OK
orange#ffa5004.9
goldenrod#daa5205.7
sandybrown#f4a4609.1

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
amber-400#ffba003.4
amber-500#fd9a005.8
yellow-400#fcc8006.2

Code snippets

Tailwind CSS
<div class="bg-yellow-500 text-black">...</div>
<p class="text-yellow-500 border-yellow-500">...</p>
CSS
.element {
  color: var(--color-yellow-500);
  background-color: oklch(79.5% 0.184 86.047);
  border-color: #efb100;
  outline-color: rgb(239 177 0);
}
SwiftUI
import SwiftUI

extension Color {
  static let yellow500 = Color(red: 0.937, green: 0.694, blue: 0.000)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

val Yellow500 = Color(0xFFEFB100)
Flutter
import 'package:flutter/material.dart';

const yellow500 = Color(0xFFEFB100);
Android XML
<!-- res/values/colors.xml -->
<color name="yellow_500">#EFB100</color>

Frequently asked questions

What is the hex code for Tailwind yellow-500?
In Tailwind CSS v4, yellow-500 is oklch(79.5% 0.184 86.047), which converts to #EFB100 (rgb(239, 177, 0)) in sRGB after gamut mapping, because the OKLCH value is outside sRGB. In Tailwind v3 the same name was #EAB308.
What is the difference between yellow-500 in Tailwind v3 and v4?
v3 used the hex #EAB308; v4 redefined the palette in OKLCH as oklch(79.5% 0.184 86.047). In v3, yellow-500 was #EAB308. The v4 value is ΔE OK 2.2 away; v4 is more saturated.
How do I use yellow-500 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-yellow-500). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on yellow-500?
White text on yellow-500 has a contrast ratio of 1.91:1, which fails AA even for large text under WCAG 2.2. Black text reaches 10.95:1 and passes both AA and AAA. In APCA terms that is Lc −40.6 for white and Lc 67.6 for black.
Which CSS named color is closest to yellow-500?
The closest is orange (#FFA500) at ΔE OK 4.9, followed by goldenrod and sandybrown.

Last reviewed by Arielton Oberek.