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.
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
| Tailwind v4 token | --color-yellow-900 |
|---|---|
| OKLCH (source value) | oklch(42.1% 0.095 57.708) |
| HEX | #733E0A |
| RGB | rgb(115, 62, 10) |
| HSL | hsl(30, 84%, 25%) |
| HWB | hwb(30 4% 55%) |
| CMYK (naive, no ICC profile) | cmyk(0%, 46%, 91%, 55%) |
| Decimal | 7,552,522 |
| Tailwind v3 hex | #713F12 |
| Utility classes | bg-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.
| Pair | Ratio | AA | AA large | AAA | AAA large | APCA Lc |
|---|---|---|---|---|---|---|
| Black text on yellow-900 | 2.42:1 | Fail | Fail | Fail | Fail | 14.6 |
| White text on yellow-900 | 8.66:1 | Pass | Pass | Pass | Pass | −93.9 |
| Yellow-900 text on white | 8.66:1 | Pass | Pass | Pass | Pass | 89.4 |
| Yellow-900 text on black | 2.42:1 | Fail | Fail | Fail | Fail | −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)
- 5%
#7a4816 - 15%
#885b2f - 25%
#966e47 - 35%
#a48260 - 45%
#b29578 - 55%
#c0a891 - 65%
#cebba9 - 75%
#dccfc2 - 85%
#eae2da - 95%
#f8f5f3
Shades (mixed with black)
- 5%
#6d3b0a - 15%
#623509 - 25%
#562f08 - 35%
#4b2807 - 45%
#3f2206 - 55%
#341c05 - 65%
#281604 - 75%
#1d1003 - 85%
#110902 - 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.
| Harmony | Rotation | Color |
|---|---|---|
| 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
| Color | HEX | ΔE OK |
|---|---|---|
| saddlebrown | #8b4513 | 5.4 |
| darkred | #8b0000 | 9.5 |
| maroon | #800000 | 9.5 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| amber-900 | #7b3306 | 2.8 |
| orange-900 | #7e2a0c | 4.8 |
| yellow-800 | #894b00 | 5.9 |
Code snippets
<div class="bg-yellow-900 text-white">...</div>
<p class="text-yellow-900 border-yellow-900">...</p>.element {
color: var(--color-yellow-900);
background-color: oklch(42.1% 0.095 57.708);
border-color: #733e0a;
outline-color: rgb(115 62 10);
}import SwiftUI
extension Color {
static let yellow900 = Color(red: 0.451, green: 0.243, blue: 0.039)
}import androidx.compose.ui.graphics.Color
val Yellow900 = Color(0xFF733E0A)import 'package:flutter/material.dart';
const yellow900 = Color(0xFF733E0A);<!-- 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.