Skip to content

Tailwind CSS v4 default palette

Tailwind yellow-900: #733E0A

In Tailwind CSS v4, yellow-900 is defined as --color-yellow-900: oklch(42.1% 0.095 57.708), which is #733E0A in hex and rgb(115, 62, 10): a dark, moderately saturated brown. In Tailwind v3, yellow-900 was #713F12.

yellow-900#733E0A

In OKLCH, yellow-900 has a lightness of 42.1%, chroma 0.095 and hue 57.7°.

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

In v3, yellow-900 was #713F12. The v4 value is ΔE OK 0.5 away, below the point where most people can tell them apart; 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-900

Color codes for yellow-900
Tailwind v4 token--color-yellow-900
OKLCH (source value)oklch(42.1% 0.095 57.708)
HEX#733E0A
RGBrgb(115, 62, 10)
HSLhsl(30, 84%, 25%)
HWBhwb(30 4% 55%)
CMYK (naive, no ICC profile)cmyk(0%, 46%, 91%, 55%)
Decimal7,552,522
Tailwind v3 hex#713F12
Utility classesbg-yellow-900, text-yellow-900, border-yellow-900

Tailwind yellow scale

Contrast and accessibility

On yellow-900, white text has a contrast ratio of 8.66:1 and passes AAA at any text size; black text reaches 2.42: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-9002.42:1FailFailFailFail14.6
White text on yellow-9008.66:1PassPassPassPass−93.9
Yellow-900 text on white8.66:1PassPassPassPass89.4
Yellow-900 text on black2.42:1FailFailFailFail−12.9

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #7a4816
  2. 15%
    #885b2f
  3. 25%
    #966e47
  4. 35%
    #a48260
  5. 45%
    #b29578
  6. 55%
    #c0a891
  7. 65%
    #cebba9
  8. 75%
    #dccfc2
  9. 85%
    #eae2da
  10. 95%
    #f8f5f3

Shades (mixed with black)

  1. 5%
    #6d3b0a
  2. 15%
    #623509
  3. 25%
    #562f08
  4. 35%
    #4b2807
  5. 45%
    #3f2206
  6. 55%
    #341c05
  7. 65%
    #281604
  8. 75%
    #1d1003
  9. 85%
    #110902
  10. 95%
    #060301

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, yellow-900's complementary color is #00537B (close to darkslategray), its analogous colors are #79362F and #634900, and its triadic partners are #005D4D and #54407A. For text on top, white gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#00537b
Analogous−30°, +30°#79362f#634900
Triadic+120°, +240°#005d4d#54407a
Split-complementary+150°, +210°#005a67#374a81

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-900 is a warm color: its hue is 30° 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
saddlebrown#8b45135.4
darkred#8b00009.5
maroon#8000009.5

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
amber-900#7b33062.8
orange-900#7e2a0c4.8
yellow-800#894b005.9

Code snippets

Tailwind CSS
<div class="bg-yellow-900 text-white">...</div>
<p class="text-yellow-900 border-yellow-900">...</p>
CSS
.element {
  color: var(--color-yellow-900);
  background-color: oklch(42.1% 0.095 57.708);
  border-color: #733e0a;
  outline-color: rgb(115 62 10);
}
SwiftUI
import SwiftUI

extension Color {
  static let yellow900 = Color(red: 0.451, green: 0.243, blue: 0.039)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const yellow900 = Color(0xFF733E0A);
Android XML
<!-- res/values/colors.xml -->
<color name="yellow_900">#733E0A</color>

Frequently asked questions

What is the hex code for Tailwind yellow-900?
In Tailwind CSS v4, yellow-900 is oklch(42.1% 0.095 57.708), which converts to #733E0A (rgb(115, 62, 10)) in sRGB. In Tailwind v3 the same name was #713F12.
What is the difference between yellow-900 in Tailwind v3 and v4?
v3 used the hex #713F12; v4 redefined the palette in OKLCH as oklch(42.1% 0.095 57.708). In v3, yellow-900 was #713F12. The v4 value is ΔE OK 0.5 away, below the point where most people can tell them apart; v4 is more saturated.
How do I use yellow-900 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-yellow-900). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on yellow-900?
White text on yellow-900 has a contrast ratio of 8.66:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 2.42:1 and fails AA even for large text. In APCA terms that is Lc −93.9 for white and Lc 14.6 for black.
Which CSS named color is closest to yellow-900?
The closest is saddlebrown (#8B4513) at ΔE OK 5.4, followed by darkred and maroon.

Last reviewed by Arielton Oberek.