olive drab color code
The hex code for olive drab is #6B8E23, which is rgb(107, 142, 35) in RGB and cmyk(25%, 0%, 75%, 44%) in CMYK. It's a dark, rich green. It is a built-in CSS colour, so you can also write it as “olivedrab”.
Build a full palette from it: open in the palette generator.
Move the sliders to find a lighter, darker or softer olive drab; the codes update as you go.
Olive Drab colour codes
| HEX | #6B8E23 |
|---|---|
| RGB | rgb(107, 142, 35) |
| HSL | hsl(80, 60%, 35%) |
| HSV / HSB | hsv(80, 75%, 56%) |
| CMYK | cmyk(25%, 0%, 75%, 44%) |
| Decimal | 7048739 |
| CSS keyword | olivedrab |
About olive drab
Olive Drab sits at a hue of 80° on the colour wheel, with 60% saturation and 35% lightness. That makes it a colour that sits between warm and cool: greens and purples like this can be styled warm or cool depending on what you put next to them.
For text, black reads better on olive drab. Olive Drab as text on a white background has a contrast ratio of 3.8: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.51:1, which passes AA for body text.
Tints and shades of olive drab
Tints mix olive drab 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.
Colours that go with olive drab
Complementary — opposite on the colour wheel: maximum contrast
Analogous — neighbours 30° either side: calm and natural
Triadic — three hues 120° apart: lively but balanced
Split complementary — the two neighbours of the complement: contrast with less tension
Tetradic — four hues 90° apart: rich, use one as the main colour
Olive Drab text contrast
| Combination | Ratio | AA normal (4.5:1) | AA large (3:1) | AAA (7:1) |
|---|---|---|---|---|
| olive drab on white | 3.8:1 | fail | pass | fail |
| olive drab on black | 5.51:1 | pass | pass | fail |
Check olive drab against any other colour in the contrast checker.
How olive drab 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.
Use olive drab in code
.olive-drab {
color: olivedrab;
background-color: #6b8e23;
border-color: rgb(107, 142, 35);
}Frequently asked questions
What is the hex code for olive drab?
Olive Drab is #6B8E23 (lowercase #6b8e23). It's the official value of the CSS keyword “olivedrab”.
What is olive drab in RGB, HSL and CMYK?
RGB: rgb(107, 142, 35). HSL: hsl(80, 60%, 35%). CMYK: cmyk(25%, 0%, 75%, 44%). 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 drab?
Its complementary colour is #46238E (close to indigo), which gives the strongest contrast. For a calmer look, use the analogous colours #8E7C23 and #358E23, or the triadic pair #236B8E and #8E236B. Tints and shades of olive drab itself always work together.
Is olive drab a warm or cool colour?
Olive Drab has a hue of 80°, which makes it neither clearly warm nor cool.
Should I use black or white text on olive drab?
Black. Black text on olive drab has a contrast ratio of 5.51:1 and white text has 3.8:1. WCAG asks for at least 4.5:1 for normal text and 3:1 for large text.
How do I use olive drab in CSS?
Write color: olivedrab; or color: #6b8e23; — both give the same colour. Named colours work in every browser.