Olive #808000

Olive color (#808000)

Olive is one of the 148 CSS named colors. Use the keyword olive anywhere CSS accepts a color, or its hex code #808000, which is rgb(128, 128, 0) in RGB.

It is a medium, moderately saturated cool color with a hue angle of 60° on the HSL color wheel and a perceived lightness of 58% in OKLCH. On a olive background, black text gives the higher contrast at 5.00:1, which passes WCAG AA for normal text.

Olive color codes

CSS name olive
HEX #808000
HEX (8-digit) #808000FF
RGB rgb(128, 128, 0)
HSL hsl(60, 100%, 25%)
HSV / HSB hsv(60, 100%, 50%)
OKLCH oklch(58.1% 0.1266 109.8)
CMYK cmyk(0%, 0%, 100%, 49.8%)

Contrast with white and black

WCAG 2 contrast ratios and APCA lightness contrast (Lc) for olive used as text and as a background.

Aa Sample text
Olive text on white
4.19:1 WCAG Lc 68.8 APCA AA large text only
Aa Sample text
Olive text on black
5.00:1 WCAG Lc -32.9 APCA Passes AA
Aa Sample text
White text on olive
4.19:1 WCAG Lc -74.2 APCA AA large text only
Aa Sample text
Black text on olive
5.00:1 WCAG Lc 35.3 APCA Passes AA

Tints and shades of olive

Tints mix olive with white; shades mix it with black, in 10% steps. Click a swatch to copy it, or build custom scales in the tint & shade generator.

Tints

Shades

Colors that go with olive

Harmonies calculated on the HSL color wheel. Explore more in the color scheme generator.

Complementary

Analogous

Triadic

Split-Complementary

Olive with color blindness

Approximately how olive appears with each type of color vision deficiency. Test full designs with the color blindness simulator.

Using olive in CSS

.element {
  color: olive;
  background-color: #808000;
  border-color: rgb(128 128 0 / 50%);
  outline-color: oklch(58.1% 0.1266 109.8);
}

Similar named colors

See all shades of green or browse every CSS color name.

Related tools