Skip to content

Olive

Hex #808000, rgb(128 128 0). A yellow CSS named color.

Open in palette generator

Olive color codes

Click any value to copy it.

HEX
RGB
HSL
HSV
HWB
CMYK
OKLCH
OKLab
Lab
LCH
CSS keyword

About Olive

Olive is a medium saturated yellow with the hex code #808000. In RGB it is made of 128 red, 128 green and 0 blue; in HSL its hue is 60°, with 100% saturation and 25% lightness. Its perceptual lightness (OKLCH L) is 58.1%.

It is a CSS named color, so you can write "olive" anywhere CSS accepts a color. Against white it has a contrast ratio of 4.20:1 and against black 5.01:1, so black text reads better on it and passes WCAG AA for normal text.

Tints, shades and tones

Olive mixed step by step with white, black and middle gray (#808080).

Tints (with white)

Shades (with black)

Tones (with gray)

Olive 50-950 scale

A Tailwind-style scale built in OKLCH; the original color sits on the step with the closest lightness.

Colors that go with Olive

Color harmonies rotate the hue in OKLCH and keep the lightness and chroma. Each color links to its closest named color.

Complementary

Analogous

Triadic

Split complementary

Tetradic

Square

Monochromatic

Contrast and readability

WCAG 2 contrast of Olive with white and black. The readable text color on Olive is black.

Olive textSmall text on white

On white4.20:1

  • AA fail
  • AA Large pass
  • AAA fail
  • UI 3:1 pass

APCA Lc 69

Olive textSmall text on black

On black5.01:1

  • AA pass
  • AA Large pass
  • AAA fail
  • UI 3:1 pass

APCA Lc -33

Black text on Olive (#000000)

Test any pair in the contrast checker.

Color blindness preview

How Olive appears with each type of color vision deficiency (simulated with the Machado model).

  • Protanopia#8B7A00
  • Deuteranopia#8D7D13
  • Tritanopia#8A776C
  • Protanomaly#897C00
  • Deuteranomaly#8A7E0E
  • Tritanomaly#837C4A
  • Achromatopsia#7C7C7C

Colors similar to Olive

The closest named colors by perceptual difference (OKLab).

Use Olive in CSS and Tailwind

CSS
.olive {
  color: olive; /* #808000 */
  background-color: rgb(128 128 0);
  border-color: oklch(58.1% 0.127 109.8);
}
Tailwind CSS
/* Tailwind CSS v4: bg-olive-500, text-olive-700... */
@theme {
  --color-olive-50: #FAFBF4;
  --color-olive-100: #EFF0E0;
  --color-olive-200: #DEE0C2;
  --color-olive-300: #C6C892;
  --color-olive-400: #A6A850;
  --color-olive-500: #92931E;
  --color-olive-600: #808000;
  --color-olive-700: #666600;
  --color-olive-800: #515101;
  --color-olive-900: #414106;
  --color-olive-950: #171700;
}

<!-- or the exact color, no config -->
<div class="bg-[#808000] text-[#000000]">…</div>