About green
The standard CSS green. Pure screen green (#00FF00) is called lime in CSS. Its hex code is #008000, which is rgb(0, 128, 0): 0 red, 128 green and 0 blue on a scale of 0 to 255.
Other values you'll see for green: #00FF00 (pure screen green).
Green sits between warm and cool, so it can lean either way depending on what it's paired with.
Green tints and shades
Lighter tints (mixed with white) and darker shades (mixed with black) of green. Click any of them to copy its hex code.
Colors that go with green
Complementary
The opposite color on the color wheel, for strong contrast.
Analogous
Neighbors on the color wheel, for a calm, matching look.
Triadic
Three colors evenly spaced around the wheel, for a balanced, lively palette.
Split complementary
The two colors either side of the complement: contrast without clashing.
Text on green
White text
Black text
For readable text, WCAG asks for a contrast ratio of at least 4.5:1 (3:1 for large text). White text is the better choice on green. Test other combinations with the contrast checker.
Using green in CSS
.element {
color: #008000;
background-color: rgb(0 128 0);
border-color: hsl(120 100% 25%);
}
Frequently asked questions
What is the hex code for green?
Green is #008000. In RGB it's rgb(0, 128, 0), and in HSL it's hsl(120, 100%, 25%).
What colors go with green?
Its complementary color is #800080, which gives strong contrast. For a softer look, use analogous colors #408000 and #008040. Green also pairs well with white.
Is green warm or cool?
Green sits between warm and cool, so it can lean either way depending on what it's paired with.
Should I use white or black text on green?
Use white text. Its contrast ratio on green is 5.13:1, versus 4.08:1 for black.
Similar colors
- Forest green#228B22rgb(34, 139, 34)
- Lime green#32CD32rgb(50, 205, 50)
- Mint green#98FF98rgb(152, 255, 152)
- Emerald green#50C878rgb(80, 200, 120)
- Hunter green#355E3Brgb(53, 94, 59)
- Sage green#9CAF88rgb(156, 175, 136)
See all popular colors · All HTML color names · Open green in the color picker