Olive Hex Code #808000
Olive is a medium, strong green with the hex code #808000. In RGB it is 128, 128, 0, and in HSL it is 60°, 100%, 25%. It is one of the 148 named colors in CSS, so you can write “olive” instead of the hex code.
- HEX
- #808000
- RGB
- rgb(128, 128, 0)
- HSL
- hsl(60, 100%, 25%)
- HSV
- hsv(60°, 100%, 50%)
- CMYK
- cmyk(0%, 0%, 100%, 50%)
- CSS name
- olive
CMYK is a simple screen-to-print estimate. Real print results depend on the printer and paper.
About Olive
On a white background Olive has a contrast ratio of 4.20:1 (AA Large), and on black 5.01:1 (AA). Black text is the better choice on top of it.
It sits on the warm side of the color wheel, a range that tends to feel energetic and appears to advance toward the viewer.
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.
Good to know: Olive (#808000) is yellow at half intensity: red and green are both 128, and blue is zero.
Shades and tints of Olive
Tints mix Olive with white and shades mix it with black, in steps of 20%. Select a swatch to copy its hex code.
Color harmonies for Olive
These schemes are calculated from Olive on the RGB (screen) color wheel. Select a swatch to copy it, or open any scheme in the color wheel to adjust it.
On the artist’s RYB wheel, the complement of Olive is #4B0080, close to the named color Indigo.
Olive 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 scores against white and black.
| Against | Ratio | AA normal | AA large | AAA normal | AAA large |
|---|---|---|---|---|---|
| White (#ffffff) | 4.20:1 | ✕ Fail | ✓ Pass | ✕ Fail | ✕ Fail |
| Black (#000000) | 5.01:1 | ✓ Pass | ✓ Pass | ✕ Fail | ✓ Pass |
Olive and color blindness
These are approximate previews of how Olive can look with the main types of color vision deficiency.
Olive shifts slightly.
Olive shifts slightly.
Olive changes noticeably.
Olive changes noticeably.
Gradients with Olive
Three ready-made starting points. Copy the CSS, or open one in the generator to edit the stops and check contrast.
Olive to a lighter tint
background: linear-gradient(135deg, #808000 0%, #cccc99 100%); Olive to its analogous neighbour
background: linear-gradient(135deg, #808000 0%, #408000 100%); Olive to its complement
background: linear-gradient(135deg, #808000 0%, #000080 100%); Colors similar to Olive
How each close match differs from Olive.
- Olive Drab #6B8E23 More muted, leans more green.
- Dark Goldenrod #B8860B Slightly lighter, more saturated, leans more orange.
- Dark Khaki #BDB76B Lighter, more muted.
- Dark Olive Green #556B2F Slightly darker, more muted, leans more green.
- Goldenrod #DAA520 Lighter, more saturated, leans more orange.
- Yellow Green #9ACD32 Lighter, more saturated, leans more green.
Use Olive in code
.element {
color: #808000;
background-color: #808000;
border-color: olive; /* olive is a valid CSS color name */
} :root {
--color-olive: #808000;
} <!-- Tailwind arbitrary values -->
<div class="bg-[#808000] text-[#808000] border-[#808000]"></div>
/* Tailwind v4 theme color */
@theme {
--color-olive: #808000;
} Olive questions
What is the hex code for Olive?
The hex code for Olive is #808000. In RGB that is rgb(128, 128, 0), and in HSL it is hsl(60, 100%, 25%).
What is the complementary color of Olive?
On the RGB (screen) color wheel, the complement of Olive is #000080, which is close to Navy. On the artist’s RYB wheel it is #4B0080, close to Indigo.
Should I use white or black text on Olive?
Black text. It has a contrast ratio of 5.01:1 against Olive, which is WCAG AA. The other option scores 4.20:1.
Is Olive accessible as a text color on white?
Only for large text. Olive on white scores 4.20: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?
Mixing Olive with black gives #666600, #4D4D00, #333300, #1A1A00 (20% to 80% black). Mixing it with white gives #999933, #B3B366, #CCCC99, #E6E6CC (20% to 80% white).