Tailwind CSS v4 default palette
Tailwind green-900: #0D542B
In Tailwind CSS v4, green-900 is defined as --color-green-900: oklch(39.3% 0.095 152.535), which is #0D542B in hex and rgb(13, 84, 43): a dark, moderately saturated green. In Tailwind v3, green-900 was #14532D.
In OKLCH, green-900 has a lightness of 39.3%, chroma 0.095 and hue 152.5°.
The value fits inside sRGB, so the hex #0D542B represents it without loss on any screen.
In v3, green-900 was #14532D. The v4 value is ΔE OK 0.5 away, below the point where most people can tell them apart; v4 is more saturated.
Tailwind green is the standard success color; in v4 its mid shades moved to a more saturated OKLCH green than the v3 hex values.
Color codes for green-900
| Tailwind v4 token | --color-green-900 |
|---|---|
| OKLCH (source value) | oklch(39.3% 0.095 152.535) |
| HEX | #0D542B |
| RGB | rgb(13, 84, 43) |
| HSL | hsl(145, 73%, 19%) |
| HWB | hwb(145 5% 67%) |
| CMYK (naive, no ICC profile) | cmyk(85%, 0%, 49%, 67%) |
| Decimal | 873,515 |
| Tailwind v3 hex | #14532D |
| Utility classes | bg-green-900, text-green-900, border-green-900 |
Tailwind green scale
Contrast and accessibility
On green-900, white text has a contrast ratio of 9.05:1 and passes AAA at any text size; black text reaches 2.32: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 green-900 | 2.32:1 | Fail | Fail | Fail | Fail | 13.6 |
| White text on green-900 | 9.05:1 | Pass | Pass | Pass | Pass | −94.8 |
| Green-900 text on white | 9.05:1 | Pass | Pass | Pass | Pass | 90.4 |
| Green-900 text on black | 2.32:1 | Fail | Fail | Fail | Fail | −11.9 |
Tints and shades
Each step mixes var(--color-green-900) with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, var(--color-green-900), white 25%) in CSS.
Tints (mixed with white)
- 5%
#195d36 - 15%
#316e4b - 25%
#4a7f60 - 35%
#629075 - 45%
#7aa18a - 55%
#92b2a0 - 65%
#aac3b5 - 75%
#c3d4ca - 85%
#dbe5df - 95%
#f3f6f4
Shades (mixed with black)
- 5%
#0c5029 - 15%
#0b4725 - 25%
#0a3f20 - 35%
#08371c - 45%
#072e18 - 55%
#062613 - 65%
#051d0f - 75%
#03150b - 85%
#020d06 - 95%
#010402
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, green-900's complementary color is #63305C (close to darkslateblue), its analogous colors are #3D4D01 and #00554A, and its triadic partners are #354178 and #702F23. For text on top, white gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #63305c |
| Analogous | −30°, +30° | #3d4d01#00554a |
| Triadic | +120°, +240° | #354178#702f23 |
| Split-complementary | +150°, +210° | #50376f#6e2d41 |
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 green-900 is a cool color: its hue is 145° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.
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 |
|---|---|---|
| darkgreen | #006400 | 7.2 |
| darkslategray | #2f4f4f | 7.3 |
| darkolivegreen | #556b2f | 11.1 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| emerald-900 | #004f3b | 3.4 |
| lime-900 | #35530e | 3.9 |
| emerald-800 | #006045 | 4.6 |
Code snippets
<div class="bg-green-900 text-white">...</div>
<p class="text-green-900 border-green-900">...</p>.element {
color: var(--color-green-900);
background-color: oklch(39.3% 0.095 152.535);
border-color: #0d542b;
outline-color: rgb(13 84 43);
}import SwiftUI
extension Color {
static let green900 = Color(red: 0.051, green: 0.329, blue: 0.169)
}import androidx.compose.ui.graphics.Color
val Green900 = Color(0xFF0D542B)import 'package:flutter/material.dart';
const green900 = Color(0xFF0D542B);<!-- res/values/colors.xml -->
<color name="green_900">#0D542B</color>Frequently asked questions
- What is the hex code for Tailwind green-900?
- In Tailwind CSS v4, green-900 is oklch(39.3% 0.095 152.535), which converts to #0D542B (rgb(13, 84, 43)) in sRGB. In Tailwind v3 the same name was #14532D.
- What is the difference between green-900 in Tailwind v3 and v4?
- v3 used the hex #14532D; v4 redefined the palette in OKLCH as oklch(39.3% 0.095 152.535). In v3, green-900 was #14532D. 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 green-900 in plain CSS?
- Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-green-900). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
- Can you use white text on green-900?
- White text on green-900 has a contrast ratio of 9.05:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 2.32:1 and fails AA even for large text. In APCA terms that is Lc −94.8 for white and Lc 13.6 for black.
- Which CSS named color is closest to green-900?
- The closest is darkgreen (#006400) at ΔE OK 7.2, followed by darkslategray and darkolivegreen.
Last reviewed by Arielton Oberek.