CSS color names · Greens

Olive color: hex #808000, RGB and HSL

Olive is the CSS keyword olive, hex #808000, rgb(128, 128, 0), hsl(60, 100%, 25%). It is a dark, fully saturated yellow in the greens family. Below: the colors that go with it, its tints and shades, how it reads as text, and a complete interface palette built from it.

CSS name
olive
Hex
#808000
RGB
rgb(128, 128, 0)
HSL
hsl(60, 100%, 25%)
On white
4.2:1 — large text and UI only (3:1)
On black
5.01:1 — passes AA for body text
.example {
  color: olive;          /* keyword */
  color: #808000;          /* hex */
  color: rgb(128, 128, 0); /* rgb */
  color: hsl(60, 100%, 25%); /* hsl */
}

What colors go with olive

Each match keeps olive's saturation and lightness and rotates only the hue, so the relationship is the wheel's and nothing else. Any of these can be an accent beside olive as the primary; the harmony guides explain which rule suits which interface.

Complementary

The opposite hue, 180° away — the strongest contrast, best kept to one accent per screen.

Split-complementary

The two neighbors of the complement, at 150° and 210° — most of the contrast with less tension, and two accents instead of one.

#004080
#400080

Triadic

Two hues at 120° and 240° — three evenly spaced signals, the scheme charts and category colors want.

Analogous

The neighbors at −30° and +30° — calm and cohesive, with emphasis coming from weight and size rather than hue.

#804000
#408000

Tints and shades of olive

Tints add lightness toward white; shades remove it toward black. The hue and saturation stay fixed, so every step still reads as olive — these are the hover, pressed, disabled and surface variants a single brand color needs.

Tints (lighter)

#c0c000
#ffff00 · yellow
#ffff40
#ffff80
#ffffbf

Shades (darker)

#6b6b00
#555500
#404000
#2b2b00
#151500

A UI color palette built from olive

The eight semantic roles an interface actually uses, derived from olive as the primary with the split-complementary rule: secondary and accent rotate around the wheel, and the five neutrals take the hue at lightness steps tuned for light and dark mode. This is the same derivation the palette generator runs — open it there to change the rule, drag the anchors, or export the set as CSS variables.

Light mode
primary
#808000
secondary
#004080
accent
#400080
background
#fdfdfc
surface
#f7f7f3
text
#222211
muted
#8f8f56
border
#ececdf
Dark mode
primary
#ffff1a
secondary
#1a8cff
accent
#8c1aff
background
#1b1b0e
surface
#282815
text
#f6f6f3
muted
#b8b894
border
#494927

Using olive in an interface

Green means success and 'on' — reserve one green for that job before you use another as a brand color. Sea green, forest green and teal are calm enough to lead a palette; the neon greens are for dark-mode accents and little else. Whichever role olive takes, define it once as a token rather than repeating the keyword: the semantic palette guide covers the eight roles, and the guides to complementary, triadic and the other color schemes explain how to weight the matches above.

What is the hex code for Olive?
Olive is #808000. In CSS the keyword olive, the hex #808000, rgb(128, 128, 0) and hsl(60, 100%, 25%) all paint the same color.
What colors go with Olive?
Its complement is #000080, the split-complementary pair is #004080 and #400080, the triadic partners are #008080 and #800080, and the analogous neighbors are #804000 and #408000. In an interface, use Olive for most colored elements and one of these for a single accent, at roughly an 80/20 split.
What is the opposite of Olive on the color wheel?
The opposite (complementary) color is #000080, the same saturation and lightness rotated 180° around the HSL wheel. Complementary pairs give the strongest contrast, which is why the complement should be used sparingly rather than at equal weight.
Can I use Olive for text?
Olive as text on white has a contrast ratio of 4.2:1, which fails WCAG AA for body text (4.5:1) but passes for large text and UI components (3:1). On black it is 5.01:1, which passes for body text. Use it as text on dark surfaces, or as a fill with dark text on top.

Similar named colors

More greens

We'd like to use Google cookies to understand how Nodlume is used and to measure our advertising. Nothing loads until you choose, and declining does not affect anything in the app.