Skip to content

Tailwind CSS v4 default palette

Tailwind olive-500: #7C7C67

In Tailwind CSS v4, olive-500 is defined as --color-olive-500: oklch(58% 0.031 107.3), which is #7C7C67 in hex and rgb(124, 124, 103): a medium, grayish olive.

olive-500#7C7C67

In OKLCH, olive-500 has a lightness of 58.0%, chroma 0.031 and hue 107.3°. It is the most saturated shade of the olive scale.

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

Color codes for olive-500
Tailwind v4 token--color-olive-500
OKLCH (source value)oklch(58% 0.031 107.3)
HEX#7C7C67
RGBrgb(124, 124, 103)
HSLhsl(60, 9%, 45%)
HWBhwb(60 40% 51%)
CMYK (naive, no ICC profile)cmyk(0%, 0%, 17%, 51%)
Decimal8,158,311
Utility classesbg-olive-500, text-olive-500, border-olive-500

Tailwind olive scale

Contrast and accessibility

On olive-500, black text has a contrast ratio of 4.93:1 and passes AA for normal text; white text reaches 4.25: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-5004.93:1PassPassFailPass34.7
White text on olive-5004.25:1FailPassFailFail−74.9
Olive-500 text on white4.25:1FailPassFailFail69.4
Olive-500 text on black4.93:1PassPassFailPass−32.2

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #83836f
  2. 15%
    #90907e
  3. 25%
    #9d9d8d
  4. 35%
    #aaaa9c
  5. 45%
    #b7b7ab
  6. 55%
    #c4c4bb
  7. 65%
    #d1d1ca
  8. 75%
    #deded9
  9. 85%
    #ebebe8
  10. 95%
    #f8f8f7

Shades (mixed with black)

  1. 5%
    #767662
  2. 15%
    #696958
  3. 25%
    #5d5d4d
  4. 35%
    #515143
  5. 45%
    #444439
  6. 55%
    #38382e
  7. 65%
    #2b2b24
  8. 75%
    #1f1f1a
  9. 85%
    #13130f
  10. 95%
    #060605

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, olive-500's complementary color is #79788C (close to slategray), its analogous colors are #857866 and #727F6D, and its triadic partners are #687E89 and #89737E. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#79788c
Analogous−30°, +30°#857866#727f6d
Triadic+120°, +240°#687e89#89737e
Split-complementary+150°, +210°#6f7b8d#827587

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-500 is a warm color: its hue is 60° on the HSL wheel, in the red, orange and yellow range (0° to about 70°, plus reds above 330°) that is conventionally called warm.

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
gray#8080803.7
slategray#7080906.0
dimgray#6969696.7

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
stone-500#79716b3.7
neutral-500#7373733.9
taupe-500#7c6d674.4

Code snippets

Tailwind CSS
<div class="bg-olive-500 text-black">...</div>
<p class="text-olive-500 border-olive-500">...</p>
CSS
.element {
  color: var(--color-olive-500);
  background-color: oklch(58% 0.031 107.3);
  border-color: #7c7c67;
  outline-color: rgb(124 124 103);
}
SwiftUI
import SwiftUI

extension Color {
  static let olive500 = Color(red: 0.486, green: 0.486, blue: 0.404)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const olive500 = Color(0xFF7C7C67);
Android XML
<!-- res/values/colors.xml -->
<color name="olive_500">#7C7C67</color>

Frequently asked questions

What is the hex code for Tailwind olive-500?
In Tailwind CSS v4, olive-500 is oklch(58% 0.031 107.3), which converts to #7C7C67 (rgb(124, 124, 103)) in sRGB.
Is olive-500 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 #7C7C67.
How do I use olive-500 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-olive-500). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on olive-500?
White text on olive-500 has a contrast ratio of 4.25:1, which passes AA only for large text (24 px, or 18.66 px bold, and up) under WCAG 2.2. Black text reaches 4.93:1 and passes AA for normal text but not AAA. In APCA terms that is Lc −74.9 for white and Lc 34.7 for black.
Which CSS named color is closest to olive-500?
The closest is gray (#808080) at ΔE OK 3.7, followed by slategray and dimgray.

Last reviewed by Arielton Oberek.