Skip to content

Tailwind CSS v4 default palette

Tailwind olive-400: #ABAB9C

In Tailwind CSS v4, olive-400 is defined as --color-olive-400: oklch(73.7% 0.021 106.9), which is #ABAB9C in hex and rgb(171, 171, 156): a light, grayish yellow.

olive-400#ABAB9C

In OKLCH, olive-400 has a lightness of 73.7%, chroma 0.021 and hue 106.9°.

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

Tailwind olive is a tinted neutral added in v4.2: a gray with a yellow-green cast. It has no v3 equivalent.

Color codes for olive-400

Color codes for olive-400
Tailwind v4 token--color-olive-400
OKLCH (source value)oklch(73.7% 0.021 106.9)
HEX#ABAB9C
RGBrgb(171, 171, 156)
HSLhsl(60, 8%, 64%)
HWBhwb(60 61% 33%)
CMYK (naive, no ICC profile)cmyk(0%, 0%, 9%, 33%)
Decimal11,250,588
Utility classesbg-olive-400, text-olive-400, border-olive-400

Tailwind olive scale

Contrast and accessibility

On olive-400, black text has a contrast ratio of 9.03:1 and passes AAA at any text size; white 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.

Contrast and accessibility
PairRatioAAAA largeAAAAAA largeAPCA Lc
Black text on olive-4009.03:1PassPassPassPass58.1
White text on olive-4002.32:1FailFailFailFail−50.7
Olive-400 text on white2.32:1FailFailFailFail45.8
Olive-400 text on black9.03:1PassPassPassPass−56.2

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #afafa1
  2. 15%
    #b8b8ab
  3. 25%
    #c0c0b5
  4. 35%
    #c8c8bf
  5. 45%
    #d1d1c9
  6. 55%
    #d9d9d2
  7. 65%
    #e2e2dc
  8. 75%
    #eaeae6
  9. 85%
    #f2f2f0
  10. 95%
    #fbfbfa

Shades (mixed with black)

  1. 5%
    #a2a294
  2. 15%
    #919185
  3. 25%
    #808075
  4. 35%
    #6f6f65
  5. 45%
    #5e5e56
  6. 55%
    #4d4d46
  7. 65%
    #3c3c37
  8. 75%
    #2b2b27
  9. 85%
    #1a1a17
  10. 95%
    #090908

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, olive-400's complementary color is #A8A8B7 (close to darkgray), its analogous colors are #B2A89C and #A4ADA0, and its triadic partners are #9DADB4 and #B5A5AC. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#a8a8b7
Analogous−30°, +30°#b2a89c#a4ada0
Triadic+120°, +240°#9dadb4#b5a5ac
Split-complementary+150°, +210°#a2abb7#afa6b3

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 olive-400 is close to neutral: its OKLCH chroma is only 0.021, so its temperature comes from context. The faint 60° hue gives it a slightly warm cast.

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
darkgray#a9a9a92.1
darkseagreen#8fbc8f6.6
tan#d2b48c6.8

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
taupe-400#aba09c3.0
mist-400#9ca8ab3.2
stone-400#a6a09b3.3

Code snippets

Tailwind CSS
<div class="bg-olive-400 text-black">...</div>
<p class="text-olive-400 border-olive-400">...</p>
CSS
.element {
  color: var(--color-olive-400);
  background-color: oklch(73.7% 0.021 106.9);
  border-color: #abab9c;
  outline-color: rgb(171 171 156);
}
SwiftUI
import SwiftUI

extension Color {
  static let olive400 = Color(red: 0.671, green: 0.671, blue: 0.612)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const olive400 = Color(0xFFABAB9C);
Android XML
<!-- res/values/colors.xml -->
<color name="olive_400">#ABAB9C</color>

Frequently asked questions

What is the hex code for Tailwind olive-400?
In Tailwind CSS v4, olive-400 is oklch(73.7% 0.021 106.9), which converts to #ABAB9C (rgb(171, 171, 156)) in sRGB.
Is olive-400 available in Tailwind v3?
No. The olive scale was added in Tailwind CSS v4.2. In v3 you can recreate it in tailwind.config.js under theme.extend.colors with the hex #ABAB9C.
How do I use olive-400 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-olive-400). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on olive-400?
White text on olive-400 has a contrast ratio of 2.32:1, which fails AA even for large text under WCAG 2.2. Black text reaches 9.03:1 and passes both AA and AAA. In APCA terms that is Lc −50.7 for white and Lc 58.1 for black.
Which CSS named color is closest to olive-400?
The closest is darkgray (#A9A9A9) at ΔE OK 2.1, followed by darkseagreen and tan.

Last reviewed by Arielton Oberek.