green — #008000
#008000
rgb(0, 128, 0) · hsl(120, 100%, 25%) · CSS keyword green
Can you put text on it?
| Contrast | Body text | Large text | |
|---|---|---|---|
| green on white | 5.14:1 | AA | AA |
| green on black | 4.09:1 | — | AA |
As a background, green takes white text: 5.14:1 against 4.09:1 the other way. A colour picker will give you the hex and stop there, which is why so many palettes look right and fail an accessibility audit.
Using it
color: green;
color: #008000;
color: rgb(0 128 0);
All three are the same colour. The keyword is one of the 141 CSS named colours — a list settled in CSS 2.1 and added to exactly once since, when rebeccapurple was standardised in 2014.
Colours close to green
- darkgreen — #006400
- forestgreen — #228B22
- seagreen — #2E8B57
- teal — #008080
- darkcyan — #008B8B
- darkolivegreen — #556B2F
Frequently asked questions
What is the hex code for green?
The hex code for green is #008000 — RGB 0, 128, 0.
Can I use green for text?
Yes. green reaches 5.14:1 against white, past the 4.5:1 that WCAG AA asks for body text.
Should text on green be black or white?
White — 5.14:1 against 4.09:1 the other way.
Other named colours
- greenyellow — #ADFF2F
- honeydew — #F0FFF0
- hotpink — #FF69B4
- indianred — #CD5C5C
- indigo — #4B0082
- ivory — #FFFFF0
- khaki — #F0E68C
- lavender — #E6E6FA
- lavenderblush — #FFF0F5
- lawngreen — #7CFC00
- lemonchiffon — #FFFACD
- lightblue — #ADD8E6
#008000 in full — tints, shades and harmonies · All named colours · Colour reference