Skip to content

Tailwind CSS v4 default palette

Tailwind olive-300: #D8D8D0

In Tailwind CSS v4, olive-300 is defined as --color-olive-300: oklch(88% 0.011 106.6), which is #D8D8D0 in hex and rgb(216, 216, 208): a very light gray with a faint yellow tint.

olive-300#D8D8D0

In OKLCH, olive-300 has a lightness of 88.0%, chroma 0.011 and hue 106.6°.

The value fits inside sRGB, so the hex #D8D8D0 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-300

Color codes for olive-300
Tailwind v4 token--color-olive-300
OKLCH (source value)oklch(88% 0.011 106.6)
HEX#D8D8D0
RGBrgb(216, 216, 208)
HSLhsl(60, 9%, 83%)
HWBhwb(60 82% 15%)
CMYK (naive, no ICC profile)cmyk(0%, 0%, 4%, 15%)
Decimal14,211,280
Utility classesbg-olive-300, text-olive-300, border-olive-300

Tailwind olive scale

Contrast and accessibility

On olive-300, black text has a contrast ratio of 14.65:1 and passes AAA at any text size; white text reaches 1.43: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-30014.65:1PassPassPassPass82.9
White text on olive-3001.43:1FailFailFailFail−23.7
Olive-300 text on white1.43:1FailFailFailFail20.8
Olive-300 text on black14.65:1PassPassPassPass−82.6

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #dadad2
  2. 15%
    #deded7
  3. 25%
    #e2e2dc
  4. 35%
    #e6e6e0
  5. 45%
    #eaeae5
  6. 55%
    #ededea
  7. 65%
    #f1f1ef
  8. 75%
    #f5f5f3
  9. 85%
    #f9f9f8
  10. 95%
    #fdfdfd

Shades (mixed with black)

  1. 5%
    #cdcdc6
  2. 15%
    #b8b8b1
  3. 25%
    #a2a29c
  4. 35%
    #8c8c87
  5. 45%
    #777772
  6. 55%
    #61615e
  7. 65%
    #4c4c49
  8. 75%
    #363634
  9. 85%
    #20201f
  10. 95%
    #0b0b0a

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, olive-300's complementary color is #D7D6DF (close to lightgray), its analogous colors are #DCD7D0 and #D4D9D2, and its triadic partners are #D0D9DD and #DDD5D9. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#d7d6df
Analogous−30°, +30°#dcd7d0#d4d9d2
Triadic+120°, +240°#d0d9dd#ddd5d9
Split-complementary+150°, +210°#d3d8df#dad5dc

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-300 is close to neutral: its OKLCH chroma is only 0.011, 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
lightgray#d3d3d31.7
gainsboro#dcdcdc1.8
powderblue#b0e0e65.3

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
stone-300#d6d3d11.4
neutral-300#d4d4d41.5
taupe-300#d8d2d01.6

Code snippets

Tailwind CSS
<div class="bg-olive-300 text-black">...</div>
<p class="text-olive-300 border-olive-300">...</p>
CSS
.element {
  color: var(--color-olive-300);
  background-color: oklch(88% 0.011 106.6);
  border-color: #d8d8d0;
  outline-color: rgb(216 216 208);
}
SwiftUI
import SwiftUI

extension Color {
  static let olive300 = Color(red: 0.847, green: 0.847, blue: 0.816)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const olive300 = Color(0xFFD8D8D0);
Android XML
<!-- res/values/colors.xml -->
<color name="olive_300">#D8D8D0</color>

Frequently asked questions

What is the hex code for Tailwind olive-300?
In Tailwind CSS v4, olive-300 is oklch(88% 0.011 106.6), which converts to #D8D8D0 (rgb(216, 216, 208)) in sRGB.
Is olive-300 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 #D8D8D0.
How do I use olive-300 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-olive-300). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on olive-300?
White text on olive-300 has a contrast ratio of 1.43:1, which fails AA even for large text under WCAG 2.2. Black text reaches 14.65:1 and passes both AA and AAA. In APCA terms that is Lc −23.7 for white and Lc 82.9 for black.
Which CSS named color is closest to olive-300?
The closest is lightgray (#D3D3D3) at ΔE OK 1.7, followed by gainsboro and powderblue.

Last reviewed by Arielton Oberek.