Olive green hex code: #808000, with RGB and color code

The olive green hex code is #808000, which is rgb(128, 128, 0). CSS calls this colour 'olive', so the olive color code and the olive green hex code are the same value.

Open HEX to RGB converterFree. Nothing uploaded.

Reference

Olive green color code in every format

Each value here was calculated by script from #808000, so a row can go straight into a stylesheet or a design file with no manual conversion. A note on the CMYK row: it comes from the basic RGB to CMYK formula, which ignores ink and paper. A print workflow using ICC profiles will produce different percentages, so treat this row as a starting figure.

Olive green color code in every format
FormatValue
HEX#808000
RGBrgb(128, 128, 0)
HSLhsl(60, 100%, 25%)
HSV60, 100%, 50%
CMYK0%, 0%, 100%, 50% (simple conversion)

In depth

Olive or olive green: what CSS actually calls it

The W3C CSS Color Module defines a named colour called olive, and its value is #808000. There is no CSS name spelled olive green. If you write color: olive in a stylesheet you get exactly this colour, and if you write color: olivegreen the declaration is invalid and the browser ignores it.

That distinction matters because a different CSS name sits right next to it. The named colour olivedrab is #6B8E23, a brighter and slightly bluer green. If a client sends you a swatch and calls it olive green, check the code before assuming it means #808000. Outside CSS, olive green has no single official definition, and other colour lists give different codes for it, so treat #808000 as the standard web answer rather than the only possible one.

Reference

Olive, olive drab and dark olive green side by side

Three CSS names get mixed up when people say olive. The last column is the straight-line distance from olive in RGB, on the 0 to 255 scale.

  • olive (#808000) leans yellow. It is the one most people mean.
  • olivedrab (#6B8E23) is brighter and greener, 43 steps from olive.
  • darkolivegreen (#556B2F) is the darkest. It is the only one of the three that passes 4.5:1 with white text, at 5.95:1.
Olive, olive drab and dark olive green side by side
CSS nameHEXRGBHSLOn whiteOn blackDistance from olive
olive#808000rgb(128, 128, 0)hsl(60, 100%, 25%)4.20:15.01:10
olivedrab#6B8E23rgb(107, 142, 35)hsl(80, 60%, 35%)3.81:15.52:143
darkolivegreen#556B2Frgb(85, 107, 47)hsl(82, 39%, 30%)5.95:13.53:167

Checklist

Olive green RGB: why #808000 reads as green and brown at once

The recipe is simple: red and green are equal at 128 and blue is zero. Red and green at equal half strength give a dark yellow, which is why the result looks like a dull, earthy yellow-green instead of a bright one.

  • Hue is 60 degrees, exactly halfway between red and green on the colour wheel.
  • Saturation is 100%, yet lightness is only 25%, so the colour is pure but dark.
  • Blue is set to 0, so the colour has no blue component at all.
  • Because it is a dark mid-tone, it is often paired with cream, white and charcoal.

Reference

Eight computed olive variants

The eight codes below come from a fixed recipe applied to #808000, not from a swatch book. Three are tints (olive mixed with 25, 50 and 75 percent white), two are shades (25 and 50 percent black), one is muted with 40 percent mid grey (#808080), and two turn the hue 12 degrees either way. Each label states the method. None of them is an official colour name.

Eight computed olive variants
How it was computedHEXRGBHSL
Tint, 25% white#A0A040rgb(160, 160, 64)hsl(60, 43%, 44%)
Tint, 50% white#C0C080rgb(192, 192, 128)hsl(60, 34%, 63%)
Tint, 75% white#DFDFBFrgb(223, 223, 191)hsl(60, 33%, 81%)
Shade, 25% black#606000rgb(96, 96, 0)hsl(60, 100%, 19%)
Shade, 50% black#404000rgb(64, 64, 0)hsl(60, 100%, 13%)
Muted, 40% grey#808033rgb(128, 128, 51)hsl(60, 43%, 35%)
Hue shifted +12 degrees#668000rgb(102, 128, 0)hsl(72, 100%, 25%)
Hue shifted -12 degrees#806600rgb(128, 102, 0)hsl(48, 100%, 25%)

Reference

Contrast: is olive readable as text or as a background?

Success Criterion 1.4.3 asks for at least 4.5:1 between normal text and its background, and 3:1 for large text. Success Criterion 1.4.11 asks for 3:1 on the parts of controls and icons that identify them. Both use the relative luminance of the two colours, so the figures below are exact for the listed hex codes.

Olive lands in an awkward spot. Against white it scores 4.20:1, just short of 4.5:1, so white body text on a solid olive button is a near miss. It does clear 3:1, which covers large headings and icon outlines. Against black it scores 5.01:1, so black text on olive passes for normal text. If you want white text on an olive-family background, move to the darker shade in the table below, which reaches 6.62:1.

The two hue-shifted variants are worth noticing. Shifting the hue by +12 degrees gives #668000, which scores 4.51:1 on white and just passes, while the -12 degree version is #806600 at 5.50:1.

Contrast: is olive readable as text or as a background?
ColourHEXOn whiteWhite textOn blackBlack text
Olive green (main)#8080004.20:1Passes 3:1 only5.01:1Passes 4.5:1
Tint, 25% white#A0A0402.76:1Fails 3:17.60:1Passes 4.5:1
Tint, 50% white#C0C0801.89:1Fails 3:111.09:1Passes 4.5:1
Tint, 75% white#DFDFBF1.36:1Fails 3:115.44:1Passes 4.5:1
Shade, 25% black#6060006.62:1Passes 4.5:13.17:1Passes 3:1 only
Shade, 50% black#40400010.76:1Passes 4.5:11.95:1Fails 3:1
Muted, 40% grey#8080334.16:1Passes 3:1 only5.05:1Passes 4.5:1
Hue shifted +12 degrees#6680004.51:1Passes 4.5:14.65:1Passes 4.5:1
Hue shifted -12 degrees#8066005.50:1Passes 4.5:13.82:1Passes 3:1 only

In depth

How much darker does olive need to be for white text?

White text on #808000 scores 4.20:1, a little under the 4.5:1 line. You do not need a big change to fix that.

Mixing in only 5 percent black gives #7A7A00, which scores 4.55:1 with white. We found it by trying 0, 1, 2 and so on until the ratio first passed. The 25 percent shade in the table is much darker than you need if a pass is all you want.

Reference

Colour palettes built from #808000

Each scheme below is a hue rotation in the HSL model with the same saturation and lightness as olive, so every colour in a row has a matching weight. Complementary means opposite on the wheel, analogous means neighbours, triadic means three evenly spaced colours, and split-complementary swaps the single opposite for the two colours either side of it.

Colour palettes built from #808000
SchemeHow it was computedHEXRGB
Complementaryhue +180 degrees#000080rgb(0, 0, 128)
Analogoushue +/-30 degrees#804000, #408000rgb(128, 64, 0); rgb(64, 128, 0)
Triadichue +120 and +240 degrees#008080, #800080rgb(0, 128, 128); rgb(128, 0, 128)
Split-complementaryhue +150 and +210 degrees#004080, #400080rgb(0, 64, 128); rgb(64, 0, 128)

In depth

Using the palettes in practice

On the HSL wheel, the opposite of olive is #000080, the CSS navy. It is very dark, so it suits a text colour or footer on a light page, with olive as the accent rather than the other way round.

The analogous pair, #804000 and #408000, keeps the scheme earthy. It is the safest option when you want an earthy scheme without strong contrast between the parts. The triadic and split-complementary rows are more colourful, so use them sparingly: one dominant colour, one supporting colour, and the third only for small highlights.

In depth

Where designers reach for olive green

Olive is a muted, low-key colour, and that shapes where it tends to appear. It is often used in outdoor and heritage themes, in natural or organic packaging mock-ups, and in interior and fashion moodboards built on earthy tones. It can also serve as a calm brand colour for a product that wants to look grounded rather than loud.

In interfaces it usually works best as a secondary or surface colour. As a primary button colour it needs care: use a darker shade, or accept that a white label fails the 4.5:1 line, as the contrast figures above show. Off-white or light grey backgrounds with dark text are a safe pairing.

Step by step

Try it now: convert, check and pull olive from a photo

  1. 1

    Go to the hex-to-rgb tool and enter #808000 in the HEX box. The page returns the same colour as RGB and HSL and prints its contrast ratio on white and on black. It runs in the browser, so no file or code is sent anywhere.

  2. 2

    Replace the code with #606000, the 25 percent black shade, and compare the white contrast with olive. Then try #668000 to see the hue-shifted variant that just clears 4.5:1. The colour picker lets you nudge a shade by eye.

  3. 3

    Open color-palette-from-image and load a photo of a leaf, a jacket or a room. It extracts dominant colours with a median-cut method, lets you ask for anywhere from 2 to 12 colours, and lets you click a single pixel to take its exact colour. The processing happens on your device.

  4. 4

    Copy the extracted colours as CSS variables, then paste the olive-like ones back into hex-to-rgb to see whether text on them reaches 4.5:1.

  5. 5

    Keep the codes you settle on in a short list with their contrast results, so the same olive is used across the site, the slides and any print files.

In depth

How this guide was made

The CSS names olive and olivedrab and their codes were read in the W3C CSS Color Module Level 4 on 14 November 2026; the same list has no colour called olive green. The code for darkolivegreen was read from the same list on 17 November 2026. The formats, variants, palettes, distances and contrast figures on this page were computed from the hex codes by a script.

The draft was written with AI assistance and then put through an automated check that recalculated each number. We did not reuse figures from other colour pages. If any value looks wrong, the contact page reaches us.

In pictures

See it

Olive green colour swatch showing the hex code #808000 and rgb(128, 128, 0)
Olive green, #808000, as a flat swatch. The same colour is rgb(128, 128, 0) in RGB.
Nine colour tiles: olive green #808000 and the eight computed variants from the table, each labelled with its hex code and how it was computed
The main colour and the eight variants from the table above. Each tile carries its hex code and the method that produced it.
The EditXo HEX to RGB and HSL converter with #808000 typed in, showing its RGB and HSL values and its contrast on white and on black
The HEX to RGB and HSL converter with #808000 entered. It returns the other formats and the contrast against white and black.

FAQ

Frequently asked questions

Short answers to what people ask most about this topic.

All guides

What is the olive green hex code?

The standard olive green hex is #808000, which is rgb(128, 128, 0). It is the CSS named colour olive. Olive green is a common alias, not a separate CSS name.

What is the olive color code, and is olive the same as olive green?

The olive color code is #808000. CSS only has olive, so the olive hex code and the olive green one are the same value. Other colour lists may call a different green olive green, so check the code when it matters.

Is olive green the same as olive drab?

No. CSS defines olive as #808000 and olivedrab as #6B8E23, which is a brighter, slightly bluer green. Always check the code when someone asks for either name.

Can I put white text on olive green?

Not for normal-size text. White on #808000 scores 4.20:1, below the 4.5:1 WCAG minimum, though it passes the 3:1 line for large text and icons. A shade with 5 percent black, #7A7A00, reaches 4.55:1.

How do I write olive green in CMYK?

The basic conversion from RGB gives 0%, 0%, 100%, 50%. That is an estimate only. A printer's paper, inks and colour profile change the result, so ask for a proof before a print run.

Which colours go with olive green?

The computed complementary colour is #000080, and the analogous pair is #804000 and #408000. Cream, white and charcoal are frequent partners for a dark, muted green like this one.

Do it yourself

Tools used in this guide

Check the numbers

Sources and further reading

Ready to try it?

Use the free tool or the full photo editor. Everything stays on your device.

Open HEX to RGB converterOpen the photo editor