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.
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
| Tailwind v4 token | --color-olive-300 |
|---|---|
| OKLCH (source value) | oklch(88% 0.011 106.6) |
| HEX | #D8D8D0 |
| RGB | rgb(216, 216, 208) |
| HSL | hsl(60, 9%, 83%) |
| HWB | hwb(60 82% 15%) |
| CMYK (naive, no ICC profile) | cmyk(0%, 0%, 4%, 15%) |
| Decimal | 14,211,280 |
| Utility classes | bg-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.
| Pair | Ratio | AA | AA large | AAA | AAA large | APCA Lc |
|---|---|---|---|---|---|---|
| Black text on olive-300 | 14.65:1 | Pass | Pass | Pass | Pass | 82.9 |
| White text on olive-300 | 1.43:1 | Fail | Fail | Fail | Fail | −23.7 |
| Olive-300 text on white | 1.43:1 | Fail | Fail | Fail | Fail | 20.8 |
| Olive-300 text on black | 14.65:1 | Pass | Pass | Pass | Pass | −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)
- 5%
#dadad2 - 15%
#deded7 - 25%
#e2e2dc - 35%
#e6e6e0 - 45%
#eaeae5 - 55%
#ededea - 65%
#f1f1ef - 75%
#f5f5f3 - 85%
#f9f9f8 - 95%
#fdfdfd
Shades (mixed with black)
- 5%
#cdcdc6 - 15%
#b8b8b1 - 25%
#a2a29c - 35%
#8c8c87 - 45%
#777772 - 55%
#61615e - 65%
#4c4c49 - 75%
#363634 - 85%
#20201f - 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.
| Harmony | Rotation | Color |
|---|---|---|
| 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
| Color | HEX | ΔE OK |
|---|---|---|
| lightgray | #d3d3d3 | 1.7 |
| gainsboro | #dcdcdc | 1.8 |
| powderblue | #b0e0e6 | 5.3 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| stone-300 | #d6d3d1 | 1.4 |
| neutral-300 | #d4d4d4 | 1.5 |
| taupe-300 | #d8d2d0 | 1.6 |
Code snippets
<div class="bg-olive-300 text-black">...</div>
<p class="text-olive-300 border-olive-300">...</p>.element {
color: var(--color-olive-300);
background-color: oklch(88% 0.011 106.6);
border-color: #d8d8d0;
outline-color: rgb(216 216 208);
}import SwiftUI
extension Color {
static let olive300 = Color(red: 0.847, green: 0.847, blue: 0.816)
}import androidx.compose.ui.graphics.Color
val Olive300 = Color(0xFFD8D8D0)import 'package:flutter/material.dart';
const olive300 = Color(0xFFD8D8D0);<!-- 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.