Skip to content

Tailwind CSS v4 default palette

Tailwind green-300: #7BF1A8

In Tailwind CSS v4, green-300 is defined as --color-green-300: oklch(87.1% 0.15 154.449), which is #7BF1A8 in hex and rgb(123, 241, 168): a very light, vivid green. In Tailwind v3, green-300 was #86EFAC.

green-300#7BF1A8

In OKLCH, green-300 has a lightness of 87.1%, chroma 0.150 and hue 154.4°.

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

In v3, green-300 was #86EFAC. The v4 value is ΔE OK 1.4 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-300

Color codes for green-300
Tailwind v4 token--color-green-300
OKLCH (source value)oklch(87.1% 0.15 154.449)
HEX#7BF1A8
RGBrgb(123, 241, 168)
HSLhsl(143, 81%, 71%)
HWBhwb(143 48% 5%)
CMYK (naive, no ICC profile)cmyk(49%, 0%, 30%, 5%)
Decimal8,122,792
Tailwind v3 hex#86EFAC
Utility classesbg-green-300, text-green-300, border-green-300

Tailwind green scale

Contrast and accessibility

On green-300, black text has a contrast ratio of 14.98:1 and passes AAA at any text size; white text reaches 1.40: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-30014.98:1PassPassPassPass84.5
White text on green-3001.40:1FailFailFailFail−21.9
Green-300 text on white1.40:1FailFailFailFail19.2
Green-300 text on black14.98:1PassPassPassPass−84.3

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #82f2ac
  2. 15%
    #8ff3b5
  3. 25%
    #9cf5be
  4. 35%
    #a9f6c6
  5. 45%
    #b6f7cf
  6. 55%
    #c4f9d8
  7. 65%
    #d1fae1
  8. 75%
    #defce9
  9. 85%
    #ebfdf2
  10. 95%
    #f8fefb

Shades (mixed with black)

  1. 5%
    #75e5a0
  2. 15%
    #69cd8f
  3. 25%
    #5cb57e
  4. 35%
    #509d6d
  5. 45%
    #44855c
  6. 55%
    #376c4c
  7. 65%
    #2b543b
  8. 75%
    #1f3c2a
  9. 85%
    #122419
  10. 95%
    #060c08

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, green-300's complementary color is #FFB2F9 (close to plum), its analogous colors are #BFE571 and #22F4E0, and its triadic partners are #C3D1FF and #FFBFAC. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#ffb2f9
Analogous−30°, +30°#bfe571#22f4e0
Triadic+120°, +240°#c3d1ff#ffbfac
Split-complementary+150°, +210°#e4c3ff#ffbacd

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-300 is a cool color: its hue is 143° 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
lightgreen#90ee902.8
palegreen#98fb984.5
mediumspringgreen#00fa9a5.7

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
emerald-300#5ee9b53.8
teal-300#46ecd56.9
emerald-200#a4f4cf6.9

Code snippets

Tailwind CSS
<div class="bg-green-300 text-black">...</div>
<p class="text-green-300 border-green-300">...</p>
CSS
.element {
  color: var(--color-green-300);
  background-color: oklch(87.1% 0.15 154.449);
  border-color: #7bf1a8;
  outline-color: rgb(123 241 168);
}
SwiftUI
import SwiftUI

extension Color {
  static let green300 = Color(red: 0.482, green: 0.945, blue: 0.659)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const green300 = Color(0xFF7BF1A8);
Android XML
<!-- res/values/colors.xml -->
<color name="green_300">#7BF1A8</color>

Frequently asked questions

What is the hex code for Tailwind green-300?
In Tailwind CSS v4, green-300 is oklch(87.1% 0.15 154.449), which converts to #7BF1A8 (rgb(123, 241, 168)) in sRGB. In Tailwind v3 the same name was #86EFAC.
What is the difference between green-300 in Tailwind v3 and v4?
v3 used the hex #86EFAC; v4 redefined the palette in OKLCH as oklch(87.1% 0.15 154.449). In v3, green-300 was #86EFAC. The v4 value is ΔE OK 1.4 away, below the point where most people can tell them apart; v4 is more saturated.
How do I use green-300 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-green-300). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on green-300?
White text on green-300 has a contrast ratio of 1.40:1, which fails AA even for large text under WCAG 2.2. Black text reaches 14.98:1 and passes both AA and AAA. In APCA terms that is Lc −21.9 for white and Lc 84.5 for black.
Which CSS named color is closest to green-300?
The closest is lightgreen (#90EE90) at ΔE OK 2.8, followed by palegreen and mediumspringgreen.

Last reviewed by Arielton Oberek.