Skip to content

Tailwind CSS v4 default palette

Tailwind green-400: #05DF72

In Tailwind CSS v4, green-400 is defined as --color-green-400: oklch(79.2% 0.209 151.711), which is #05DF72 in hex and rgb(5, 223, 114): a light, vivid green-cyan. In Tailwind v3, green-400 was #4ADE80.

green-400#05DF72

In OKLCH, green-400 has a lightness of 79.2%, chroma 0.209 and hue 151.7°.

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

In v3, green-400 was #4ADE80. The v4 value is ΔE OK 2.8 away; v4 is darker and 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-400

Color codes for green-400
Tailwind v4 token--color-green-400
OKLCH (source value)oklch(79.2% 0.209 151.711)
HEX#05DF72
RGBrgb(5, 223, 114)
HSLhsl(150, 96%, 45%)
HWBhwb(150 2% 13%)
CMYK (naive, no ICC profile)cmyk(98%, 0%, 49%, 13%)
Decimal384,882
Tailwind v3 hex#4ADE80
Utility classesbg-green-400, text-green-400, border-green-400

Tailwind green scale

Contrast and accessibility

On green-400, black text has a contrast ratio of 11.80:1 and passes AAA at any text size; white text reaches 1.77: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 green-40011.80:1PassPassPassPass71.8
White text on green-4001.77:1FailFailFailFail−36.0
Green-400 text on white1.77:1FailFailFailFail32.0
Green-400 text on black11.80:1PassPassPassPass−70.7

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #12e179
  2. 15%
    #2be487
  3. 25%
    #44e795
  4. 35%
    #5deaa3
  5. 45%
    #76edb1
  6. 55%
    #8ff1c0
  7. 65%
    #a8f4ce
  8. 75%
    #c1f7dc
  9. 85%
    #dafaea
  10. 95%
    #f3fdf8

Shades (mixed with black)

  1. 5%
    #05d46c
  2. 15%
    #04be61
  3. 25%
    #04a756
  4. 35%
    #03914a
  5. 45%
    #037b3f
  6. 55%
    #026433
  7. 65%
    #024e28
  8. 75%
    #01381d
  9. 85%
    #012111
  10. 95%
    #000b06

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, green-400's complementary color is #FF81F6 (close to violet), its analogous colors are #A7CE00 and #00DCC2, and its triadic partners are #9EB6FF and #FF957F. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#ff81f6
Analogous−30°, +30°#a7ce00#00dcc2
Triadic+120°, +240°#9eb6ff#ff957f
Split-complementary+150°, +210°#cda2ff#ff8db4

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-400 is a cool color: its hue is 150° 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

Nearest CSS named colors
ColorHEXΔE OK
limegreen#32cd326.4
mediumspringgreen#00fa9a7.7
springgreen#00ff7f8.7

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
emerald-400#00d4925.7
green-500#00c9507.0
lime-500#7ccf008.7

Code snippets

Tailwind CSS
<div class="bg-green-400 text-black">...</div>
<p class="text-green-400 border-green-400">...</p>
CSS
.element {
  color: var(--color-green-400);
  background-color: oklch(79.2% 0.209 151.711);
  border-color: #05df72;
  outline-color: rgb(5 223 114);
}
SwiftUI
import SwiftUI

extension Color {
  static let green400 = Color(red: 0.020, green: 0.875, blue: 0.447)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const green400 = Color(0xFF05DF72);
Android XML
<!-- res/values/colors.xml -->
<color name="green_400">#05DF72</color>

Frequently asked questions

What is the hex code for Tailwind green-400?
In Tailwind CSS v4, green-400 is oklch(79.2% 0.209 151.711), which converts to #05DF72 (rgb(5, 223, 114)) in sRGB. In Tailwind v3 the same name was #4ADE80.
What is the difference between green-400 in Tailwind v3 and v4?
v3 used the hex #4ADE80; v4 redefined the palette in OKLCH as oklch(79.2% 0.209 151.711). In v3, green-400 was #4ADE80. The v4 value is ΔE OK 2.8 away; v4 is darker and more saturated.
How do I use green-400 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-green-400). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on green-400?
White text on green-400 has a contrast ratio of 1.77:1, which fails AA even for large text under WCAG 2.2. Black text reaches 11.80:1 and passes both AA and AAA. In APCA terms that is Lc −36.0 for white and Lc 71.8 for black.
Which CSS named color is closest to green-400?
The closest is limegreen (#32CD32) at ΔE OK 6.4, followed by mediumspringgreen and springgreen.

Last reviewed by Arielton Oberek.