CSS named color
OliveDrab #6B8E23
OliveDrab is a yellow-green with the hex code #6B8E23, which converts to rgb(107, 142, 35). Open #6B8E23 in the converter to tweak it.
OliveDrab color values
| HEX | #6B8E23 |
|---|---|
| HEX (shorthand) | — |
| RGB | rgb(107, 142, 35) |
| RGBA | rgba(107, 142, 35, 1) |
| 8-digit HEX | #6B8E23FF |
| HSL | hsl(80, 60%, 35%) |
| HSV / HSB | 80°, 75%, 56% |
| CMYK | 25%, 0%, 75%, 44% |
| RGB 0–1 | 0.42, 0.557, 0.137 |
| Decimal | 7048739 |
| CSS keyword | olivedrab |
How #6B8E23 converts to RGB
Split the hex code into three pairs and read each pair as a base-16 number: 6B → 107, 8E → 142, 23 → 35. That gives rgb(107, 142, 35). The step-by-step guide explains the math.
Shades of OliveDrab
Mixed toward black in 10% steps. Click a swatch to copy its hex.
Tints of OliveDrab
Mixed toward white in 10% steps.
Color harmonies
Hue rotations of OliveDrab on the HSL color wheel, keeping saturation and lightness fixed. The color harmony guide explains when each scheme works.
Complementary
Analogous
Split-complementary
Triadic
Tetradic (square)
Contrast and accessibility
| Text | Background | Ratio | WCAG 2.x |
|---|---|---|---|
| White | OliveDrab | 3.80:1 | AA Large only |
| Black | OliveDrab | 5.51:1 | AA |
Use black text on a olivedrab background. Test any other pair in the contrast checker; thresholds are explained in the WCAG contrast guide.
Use OliveDrab in CSS
.element {
color: olivedrab; /* keyword */
background-color: #6B8E23; /* hex */
border-color: rgb(107 142 35 / 50%); /* 50% transparent */
}
Need it semi-transparent? Append an alpha byte: #6B8E2380 is OliveDrab at 50% opacity. See RGBA & transparency.
Similar named colors
FAQ
What is the HEX code for OliveDrab?
The CSS named color olivedrab is #6B8E23 in hexadecimal. In CSS you can write color: olivedrab; or color: #6B8E23; — both produce the same pixel.
What is OliveDrab in RGB?
OliveDrab is rgb(107, 142, 35): red 107, green 142, blue 35 on the 0–255 scale. As normalized 0–1 floats that is (0.42, 0.557, 0.137).
Is white or black text more readable on OliveDrab?
Black text is more readable. White on #6B8E23 has a contrast ratio of 3.80:1 (AA Large only), black on #6B8E23 has 5.51:1 (AA). WCAG AA needs 4.5:1 for normal text.