CSS named color

Olive #808000

olive rgb(128, 128, 0)

Olive is a dark yellow with the hex code #808000, which converts to rgb(128, 128, 0). Open #808000 in the converter to tweak it.

Olive color values

HEX#808000
HEX (shorthand)—
RGBrgb(128, 128, 0)
RGBArgba(128, 128, 0, 1)
8-digit HEX#808000FF
HSLhsl(60, 100%, 25%)
HSV / HSB60°, 100%, 50%
CMYK0%, 0%, 100%, 50%
RGB 0–10.502, 0.502, 0
Decimal8421376
CSS keywordolive

How #808000 converts to RGB

Split the hex code into three pairs and read each pair as a base-16 number: 80 → 128, 80 → 128, 00 → 0. That gives rgb(128, 128, 0). The step-by-step guide explains the math.

Shades of Olive

Mixed toward black in 10% steps. Click a swatch to copy its hex.

Tints of Olive

Mixed toward white in 10% steps.

Color harmonies

Hue rotations of Olive 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

TextBackgroundRatioWCAG 2.x
White Olive 4.19:1AA Large only
Black Olive 5.00:1AA

Use black text on a olive background. Test any other pair in the contrast checker; thresholds are explained in the WCAG contrast guide.

Use Olive in CSS

.element {
  color: olive;                         /* keyword */
  background-color: #808000;            /* hex */
  border-color: rgb(128 128 0 / 50%);    /* 50% transparent */
}

Need it semi-transparent? Append an alpha byte: #80800080 is Olive at 50% opacity. See RGBA & transparency.

Similar named colors

FAQ

What is the HEX code for Olive?

The CSS named color olive is #808000 in hexadecimal. In CSS you can write color: olive; or color: #808000; — both produce the same pixel.

What is Olive in RGB?

Olive is rgb(128, 128, 0): red 128, green 128, blue 0 on the 0–255 scale. As normalized 0–1 floats that is (0.502, 0.502, 0).

Is white or black text more readable on Olive?

Black text is more readable. White on #808000 has a contrast ratio of 4.19:1 (AA Large only), black on #808000 has 5.00:1 (AA). WCAG AA needs 4.5:1 for normal text.

Copied!