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.
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.