Free Accessible CSS Gradient Generator

← All Colors
#6B8E23 Olive Drab

Olive Drab Hex Code #6B8E23

Olive Drab is a medium, moderate green with the hex code #6B8E23. In RGB it is 107, 142, 35, and in HSL it is 80°, 60%, 35%. It is one of the 148 named colors in CSS, so you can write “olivedrab” instead of the hex code.

HEX
#6B8E23
RGB
rgb(107, 142, 35)
HSL
hsl(80, 60%, 35%)
HSV
hsv(80°, 75%, 56%)
CMYK
cmyk(25%, 0%, 75%, 44%)
CSS name
olivedrab

CMYK is a simple screen-to-print estimate. Real print results depend on the printer and paper.

About Olive Drab

On a white background Olive Drab has a contrast ratio of 3.81:1 (AA Large), and on black 5.52:1 (AA). Black text is the better choice on top of it.

It sits between the warm and cool halves of the color wheel, so it pairs comfortably with either.

Green suggests growth, health and success, so it is common for confirmations, finance and eco brands. Check text contrast carefully, because many mid-tone greens fall short of the WCAG minimum with white text.

Shades and tints of Olive Drab

Tints mix Olive Drab with white and shades mix it with black, in steps of 20%. Select a swatch to copy its hex code.

Color harmonies for Olive Drab

These schemes are calculated from Olive Drab on the RGB (screen) color wheel. Select a swatch to copy it, or open any scheme in the color wheel to adjust it.

Analogous

Open in the color wheel

Triadic

Open in the color wheel

Tetradic

Open in the color wheel

Square

Open in the color wheel

On the artist’s RYB wheel, the complement of Olive Drab is #8E2389, close to the named color Purple.

Olive Drab contrast and accessibility

WCAG asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (AA), and 7:1 and 4.5:1 for AAA. This is how Olive Drab scores against white and black.

Contrast of Olive Drab with white and black
AgainstRatioAA normalAA largeAAA normalAAA large
White (#ffffff) 3.81:1 ✕ Fail ✓ Pass ✕ Fail ✕ Fail
Black (#000000) 5.52:1 ✓ Pass ✓ Pass ✕ Fail ✓ Pass
Aa White text on Olive Drab3.81:1
Aa Black text on Olive Drab5.52:1

Olive Drab and color blindness

These are approximate previews of how Olive Drab can look with the main types of color vision deficiency.

Protanopia #96840D

Olive Drab changes noticeably.

Deuteranopia #91822D

Olive Drab changes noticeably.

Tritanopia #708779

Olive Drab changes noticeably.

Achromatopsia #838383

Olive Drab changes noticeably.

Gradients with Olive Drab

Three ready-made starting points. Copy the CSS, or open one in the generator to edit the stops and check contrast.

Olive Drab to a lighter tint

background: linear-gradient(135deg, #6b8e23 0%, #c4d2a7 100%);

Olive Drab to its analogous neighbour

background: linear-gradient(135deg, #6b8e23 0%, #358e23 100%);

Olive Drab to its complement

background: linear-gradient(135deg, #6b8e23 0%, #46238e 100%);

Colors similar to Olive Drab

How each close match differs from Olive Drab.

More green colors →

Use Olive Drab in code

CSS
.element {
  color: #6b8e23;
  background-color: #6b8e23;
  border-color: olivedrab;   /* olivedrab is a valid CSS color name */
}
CSS variable
:root {
  --color-olive-drab: #6b8e23;
}
Tailwind
<!-- Tailwind arbitrary values -->
<div class="bg-[#6b8e23] text-[#6b8e23] border-[#6b8e23]"></div>

/* Tailwind v4 theme color */
@theme {
  --color-olive-drab: #6b8e23;
}

Olive Drab questions

What is the hex code for Olive Drab?

The hex code for Olive Drab is #6B8E23. In RGB that is rgb(107, 142, 35), and in HSL it is hsl(80, 60%, 35%).

What is the complementary color of Olive Drab?

On the RGB (screen) color wheel, the complement of Olive Drab is #46238E, which is close to Rebecca Purple. On the artist’s RYB wheel it is #8E2389, close to Purple.

Should I use white or black text on Olive Drab?

Black text. It has a contrast ratio of 5.52:1 against Olive Drab, which is WCAG AA. The other option scores 3.81:1.

Is Olive Drab accessible as a text color on white?

Only for large text. Olive Drab on white scores 3.81:1, which passes WCAG AA for large text (3:1) but not for normal text (4.5:1).

What are darker and lighter shades of Olive Drab?

Mixing Olive Drab with black gives #56721C, #405515, #2B390E, #151C07 (20% to 80% black). Mixing it with white gives #89A54F, #A6BB7B, #C4D2A7, #E1E8D3 (20% to 80% white).

More color tools