Green Color
CSS green #008000 — a medium green that surprises many people: it is not the pure #00FF00.
Green
#008000
- HEX
- #008000
- RGB
- rgb(0, 128, 0)
- HSL
- hsl(120, 100%, 25.1%)
- HSV
- hsv(120, 100%, 50.2%)
- CMYKapproximation
- cmyk(100%, 0%, 100%, 50%)
- CSS name
- green
Open green in the color picker to adjust it or copy other formats.
About green
In CSS, the keyword green means #008000: the green channel at half intensity (128) and red and blue off. The fully saturated #00FF00 has a different name — lime. The naming goes back to the original 16 HTML colors, where the bright version was already called lime.
Because it is darker than pure green, #008000 works well in interfaces: it is readable as text on a white background and is a common choice for success messages and “go” actions.
#008000 is the value of the CSS named color green, defined in the CSS Color specification and identical in every browser.
Other colors called green
- Lime (CSS)
#00FF00Pure RGB green, full intensity. - Forest green (CSS)
#228B22A slightly lighter, more natural green.
Green shades and tints
Shades mix green with black, tints mix it with white — useful for hover states, borders and backgrounds. Click a swatch to copy its HEX code.
Colors that go with green
Color harmonies based on the hue of #008000: its complement on the opposite side of the color wheel, its analogous neighbours and its triadic partners.
Green contrast and readability
On a green background, white text reads best (5.13:1). Here is how green works as a text color:
#008000 on white
5.13:1
Normal text sample
Large text
- AA normal text (4.5:1)Pass
- AA large text (3:1)Pass
- AAA normal text (7:1)Fail
- AAA large text (4.5:1)Pass
#008000 on black
4.08:1
Normal text sample
Large text
- AA normal text (4.5:1)Fail
- AA large text (3:1)Pass
- AAA normal text (7:1)Fail
- AAA large text (4.5:1)Fail
Use #008000 or darker for green text on white. The bright #00FF00 (lime) is very hard to read on white and is better suited to dark backgrounds or small accents.
Using green in CSS and HTML
:root {
--color-green: #008000;
}
.highlight {
background-color: var(--color-green);
}.banner {
background-color: green;
color: #ffffff;
}
.label {
color: #008000;
border: 2px solid rgb(0, 128, 0);
}<p style="background-color: #008000; color: #FFFFFF;">
Green background
</p>