Skip to content

Tailwind CSS v4 default palette

Tailwind yellow-50: #FEFCE8

In Tailwind CSS v4, yellow-50 is defined as --color-yellow-50: oklch(98.7% 0.026 102.212), which is #FEFCE8 in hex and rgb(254, 252, 232): an off-white with a yellow tint. In Tailwind v3, yellow-50 was #FEFCE8.

yellow-50#FEFCE8

In OKLCH, yellow-50 has a lightness of 98.7%, chroma 0.026 and hue 102.2°.

The value fits inside sRGB, so the hex #FEFCE8 represents it without loss on any screen.

In v3, yellow-50 was #FEFCE8. The v4 value is ΔE OK 0.0 away, below the point where most people can tell them apart.

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-50

Color codes for yellow-50
Tailwind v4 token--color-yellow-50
OKLCH (source value)oklch(98.7% 0.026 102.212)
HEX#FEFCE8
RGBrgb(254, 252, 232)
HSLhsl(55, 92%, 95%)
HWBhwb(55 91% 0%)
CMYK (naive, no ICC profile)cmyk(0%, 1%, 9%, 0%)
Decimal16,710,888
Tailwind v3 hex#FEFCE8
Utility classesbg-yellow-50, text-yellow-50, border-yellow-50

Tailwind yellow scale

Contrast and accessibility

On yellow-50, black text has a contrast ratio of 20.30:1 and passes AAA at any text size; white text reaches 1.03: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-5020.30:1PassPassPassPass103.7
White text on yellow-501.03:1FailFailFailFail0.0
Yellow-50 text on white1.03:1FailFailFailFail0.0
Yellow-50 text on black20.30:1PassPassPassPass−105.3

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #fefce9
  2. 15%
    #fefceb
  3. 25%
    #fefdee
  4. 35%
    #fefdf0
  5. 45%
    #fefdf2
  6. 55%
    #fffef5
  7. 65%
    #fffef7
  8. 75%
    #fffef9
  9. 85%
    #fffffc
  10. 95%
    #fffffe

Shades (mixed with black)

  1. 5%
    #f1efdc
  2. 15%
    #d8d6c5
  3. 25%
    #bfbdae
  4. 35%
    #a5a497
  5. 45%
    #8c8b80
  6. 55%
    #727168
  7. 65%
    #595851
  8. 75%
    #403f3a
  9. 85%
    #262623
  10. 95%
    #0d0d0c

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, yellow-50's complementary color is #F8F9FF (close to ghostwhite), its analogous colors are #FFF8E8 and #F4FFED, and its triadic partners are #E9FFFF and #FFF4FF. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#f8f9ff
Analogous−30°, +30°#fff8e8#f4ffed
Triadic+120°, +240°#e9ffff#fff4ff
Split-complementary+150°, +210°#effcff#fff6ff

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-50 is close to neutral: its OKLCH chroma is only 0.026, so its temperature comes from context. The faint 55° hue gives it a slightly warm cast.

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
ivory#fffff01.1
floralwhite#fffaf01.3
cornsilk#fff8dc1.5

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
amber-50#fffbeb0.5
lime-50#f7fee71.0
orange-50#fff7ed1.6

Code snippets

Tailwind CSS
<div class="bg-yellow-50 text-black">...</div>
<p class="text-yellow-50 border-yellow-50">...</p>
CSS
.element {
  color: var(--color-yellow-50);
  background-color: oklch(98.7% 0.026 102.212);
  border-color: #fefce8;
  outline-color: rgb(254 252 232);
}
SwiftUI
import SwiftUI

extension Color {
  static let yellow50 = Color(red: 0.996, green: 0.988, blue: 0.910)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const yellow50 = Color(0xFFFEFCE8);
Android XML
<!-- res/values/colors.xml -->
<color name="yellow_50">#FEFCE8</color>

Frequently asked questions

What is the hex code for Tailwind yellow-50?
In Tailwind CSS v4, yellow-50 is oklch(98.7% 0.026 102.212), which converts to #FEFCE8 (rgb(254, 252, 232)) in sRGB. In Tailwind v3 the same name was #FEFCE8.
What is the difference between yellow-50 in Tailwind v3 and v4?
v3 used the hex #FEFCE8; v4 redefined the palette in OKLCH as oklch(98.7% 0.026 102.212). In v3, yellow-50 was #FEFCE8. The v4 value is ΔE OK 0.0 away, below the point where most people can tell them apart.
How do I use yellow-50 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-yellow-50). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on yellow-50?
White text on yellow-50 has a contrast ratio of 1.03:1, which fails AA even for large text under WCAG 2.2. Black text reaches 20.30:1 and passes both AA and AAA. In APCA terms that is Lc 0.0 for white and Lc 103.7 for black.
Which CSS named color is closest to yellow-50?
The closest is ivory (#FFFFF0) at ΔE OK 1.1, followed by floralwhite and cornsilk.

Last reviewed by Arielton Oberek.