100% free no uploads no sign-up

olive color code

The hex code for olive is #808000, which is rgb(128, 128, 0) in RGB and cmyk(0%, 0%, 100%, 50%) in CMYK. It's a dark, vivid olive. It is a built-in CSS colour, so you can also write it as “olive”.

#808000olive
White text: 4.19:1 large text onlyBlack text: 5.00:1 ✓ AANearest name: olive

Move the sliders to find a lighter, darker or softer olive; the codes update as you go.

Olive colour codes

HEX#808000
RGBrgb(128, 128, 0)
HSLhsl(60, 100%, 25%)
HSV / HSBhsv(60, 100%, 50%)
CMYKcmyk(0%, 0%, 100%, 50%)
Decimal8421376
CSS keywordolive

About olive

Olive sits at a hue of 60° on the colour wheel, with 100% saturation and 25% lightness. That makes it a warm colour: warm colours feel energetic and inviting and appear to come forward on a page.

Named after the colour of green olives.

For text, black reads better on olive. Olive as text on a white background has a contrast ratio of 4.19:1, which fails the WCAG AA rule for body text (4.5:1) and passes the 3:1 rule for large text. On black it is 5:1, which passes AA for body text.

Tints and shades of olive

Tints mix olive with white and shades mix it with black, in 10% steps. They're the easiest way to get lighter backgrounds and darker hover or text colours that still match.

#F2F2E6#E6E6CC#D9D9B3#CCCC99#C0C080#B3B366#A6A64D#999933#8D8D1A
olive #808000
#737300#666600#5A5A00#4D4D00#404000#333300#262600#1A1A00#0D0D00

Colours that go with olive

Complementary — opposite on the colour wheel: maximum contrast

#808000#000080

Analogous — neighbours 30° either side: calm and natural

#804000#808000#408000

Triadic — three hues 120° apart: lively but balanced

#808000#008080#800080

Split complementary — the two neighbours of the complement: contrast with less tension

#808000#004080#400080

Tetradic — four hues 90° apart: rich, use one as the main colour

#808000#008040#000080#800040

Olive text contrast

CombinationRatioAA normal (4.5:1)AA large (3:1)AAA (7:1)
olive on white4.19:1failpassfail
olive on black5:1passpassfail

Check olive against any other colour in the contrast checker.

How olive looks with colour blindness

Simulated with the Machado et al. (2009) model for the complete loss of one type of cone cell. Colour vision deficiency affects roughly 1 in 12 men and 1 in 200 women, most often as red-green colour blindness.

normal #808000protanopia #8B7A00deuteranopia #8D7D13tritanopia #8A776C

Use olive in code

.olive {
  color: olive;
  background-color: #808000;
  border-color: rgb(128, 128, 0);
}

Frequently asked questions

What is the hex code for olive?

Olive is #808000 (lowercase #808000). It's the official value of the CSS keyword “olive”.

What is olive in RGB, HSL and CMYK?

RGB: rgb(128, 128, 0). HSL: hsl(60, 100%, 25%). CMYK: cmyk(0%, 0%, 100%, 50%). CMYK is a simple conversion for reference; for professional printing, ask your printer for a matching ink or Pantone swatch.

What colours go with olive?

Its complementary colour is #000080 (close to navy blue), which gives the strongest contrast. For a calmer look, use the analogous colours #804000 and #408000, or the triadic pair #008080 and #800080. Tints and shades of olive itself always work together.

Is olive a warm or cool colour?

Olive has a hue of 60°, which makes it warm.

Should I use black or white text on olive?

Black. Black text on olive has a contrast ratio of 5:1 and white text has 4.19:1. WCAG asks for at least 4.5:1 for normal text and 3:1 for large text.

How do I use olive in CSS?

Write color: olive; or color: #808000; — both give the same colour. Named colours work in every browser.

Colours similar to olive