Green #008000

Green color (#008000)

Green is one of the 148 CSS named colors. Use the keyword green anywhere CSS accepts a color, or its hex code #008000, which is rgb(0, 128, 0) in RGB.

It is a medium, vivid cool color with a hue angle of 120° on the HSL color wheel and a perceived lightness of 52% in OKLCH. On a green background, white text gives the higher contrast at 5.13:1, which passes WCAG AA for normal text.

Green color codes

CSS name green
HEX #008000
HEX (8-digit) #008000FF
RGB rgb(0, 128, 0)
HSL hsl(120, 100%, 25%)
HSV / HSB hsv(120, 100%, 50%)
OKLCH oklch(52% 0.1769 142.5)
CMYK cmyk(100%, 0%, 100%, 49.8%)

Contrast with white and black

WCAG 2 contrast ratios and APCA lightness contrast (Lc) for green used as text and as a background.

Aa Sample text
Green text on white
5.13:1 WCAG Lc 74.6 APCA Passes AA
Aa Sample text
Green text on black
4.08:1 WCAG Lc -27.1 APCA AA large text only
Aa Sample text
White text on green
5.13:1 WCAG Lc -80 APCA Passes AA
Aa Sample text
Black text on green
4.08:1 WCAG Lc 29.5 APCA AA large text only

Tints and shades of green

Tints mix green with white; shades mix it with black, in 10% steps. Click a swatch to copy it, or build custom scales in the tint & shade generator.

Tints

Shades

Colors that go with green

Harmonies calculated on the HSL color wheel. Explore more in the color scheme generator.

Complementary

Analogous

Triadic

Split-Complementary

Green with color blindness

Approximately how green appears with each type of color vision deficiency. Test full designs with the color blindness simulator.

Using green in CSS

.element {
  color: green;
  background-color: #008000;
  border-color: rgb(0 128 0 / 50%);
  outline-color: oklch(52% 0.1769 142.5);
}

Similar named colors

See all shades of green or browse every CSS color name.

Related tools