Skip to content

Tailwind CSS v4 default palette

Tailwind yellow-400: #FCC800

In Tailwind CSS v4, yellow-400 is defined as --color-yellow-400: oklch(85.2% 0.199 91.936), which is #FCC800 in hex and rgb(252, 200, 0): a very light, vivid amber. In Tailwind v3, yellow-400 was #FACC15.

yellow-400#FCC800

In OKLCH, yellow-400 has a lightness of 85.2%, chroma 0.199 and hue 91.9°. It is the most saturated shade of the yellow scale.

This OKLCH value lies outside sRGB. The hex #FCC800 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.9599 0.7902 0.0585).

In v3, yellow-400 was #FACC15. The v4 value is ΔE OK 2.7 away; v4 is darker and 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-400

Color codes for yellow-400
Tailwind v4 token--color-yellow-400
OKLCH (source value)oklch(85.2% 0.199 91.936)
HEX#FCC800
RGBrgb(252, 200, 0)
HSLhsl(48, 100%, 49%)
HWBhwb(48 0% 1%)
CMYK (naive, no ICC profile)cmyk(0%, 21%, 100%, 1%)
Decimal16,566,272
Display P3color(display-p3 0.9599 0.7902 0.0585)
Tailwind v3 hex#FACC15
Utility classesbg-yellow-400, text-yellow-400, border-yellow-400

Tailwind yellow scale

Contrast and accessibility

On yellow-400, black text has a contrast ratio of 13.40:1 and passes AAA at any text size; white text reaches 1.56: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-40013.40:1PassPassPassPass78.2
White text on yellow-4001.56:1FailFailFailFail−29.0
Yellow-400 text on white1.56:1FailFailFailFail25.6
Yellow-400 text on black13.40:1PassPassPassPass−77.4

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #fccb0d
  2. 15%
    #fcd026
  3. 25%
    #fdd640
  4. 35%
    #fddb59
  5. 45%
    #fde173
  6. 55%
    #fee68c
  7. 65%
    #feeca6
  8. 75%
    #fef1bf
  9. 85%
    #fff7d9
  10. 95%
    #fffcf2

Shades (mixed with black)

  1. 5%
    #efbe00
  2. 15%
    #d6aa00
  3. 25%
    #bd9600
  4. 35%
    #a48200
  5. 45%
    #8b6e00
  6. 55%
    #715a00
  7. 65%
    #584600
  8. 75%
    #3f3200
  9. 85%
    #261e00
  10. 95%
    #0d0a00

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, yellow-400's complementary color is #B8CBFF (close to lightsteelblue), its analogous colors are #FFBA70 and #BAE123, and its triadic partners are #00E9FF and #FFA5FD. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#b8cbff
Analogous−30°, +30°#ffba70#bae123
Triadic+120°, +240°#00e9ff#ffa5fd
Split-complementary+150°, +210°#90d7ff#dcbdff

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-400 is a warm color: its hue is 48° 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
gold#ffd7004.0
orange#ffa5009.5
khaki#f0e68c11.0

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
amber-400#ffba003.6
amber-300#ffd2304.0
yellow-300#ffdf205.9

Code snippets

Tailwind CSS
<div class="bg-yellow-400 text-black">...</div>
<p class="text-yellow-400 border-yellow-400">...</p>
CSS
.element {
  color: var(--color-yellow-400);
  background-color: oklch(85.2% 0.199 91.936);
  border-color: #fcc800;
  outline-color: rgb(252 200 0);
}
SwiftUI
import SwiftUI

extension Color {
  static let yellow400 = Color(red: 0.988, green: 0.784, blue: 0.000)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const yellow400 = Color(0xFFFCC800);
Android XML
<!-- res/values/colors.xml -->
<color name="yellow_400">#FCC800</color>

Frequently asked questions

What is the hex code for Tailwind yellow-400?
In Tailwind CSS v4, yellow-400 is oklch(85.2% 0.199 91.936), which converts to #FCC800 (rgb(252, 200, 0)) in sRGB after gamut mapping, because the OKLCH value is outside sRGB. In Tailwind v3 the same name was #FACC15.
What is the difference between yellow-400 in Tailwind v3 and v4?
v3 used the hex #FACC15; v4 redefined the palette in OKLCH as oklch(85.2% 0.199 91.936). In v3, yellow-400 was #FACC15. The v4 value is ΔE OK 2.7 away; v4 is darker and more saturated.
How do I use yellow-400 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-yellow-400). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on yellow-400?
White text on yellow-400 has a contrast ratio of 1.56:1, which fails AA even for large text under WCAG 2.2. Black text reaches 13.40:1 and passes both AA and AAA. In APCA terms that is Lc −29.0 for white and Lc 78.2 for black.
Which CSS named color is closest to yellow-400?
The closest is gold (#FFD700) at ΔE OK 4.0, followed by orange and khaki.

Last reviewed by Arielton Oberek.