Green
Green is a dark, vivid color. Hex code #008000.
Green color codes
- CSS name
green - HEX
#008000 - RGB
rgb(0, 128, 0) - HSL
hsl(120, 100%, 25%) - OKLCH
oklch(52% 0.177 142.5)
HSB and CMYK values
- HSB / HSV
hsb(120, 100%, 50%) - CMYK
C100 M0 Y100 K50
White text
5.13:1 · passes WCAG AA
Black text
4.08:1 · passes WCAG AA for large text only
Shades of green
A darker shade of green is #004500 (700), and a lighter one is #4FB749 (300).
Colors that go with green
Complementary
Analogous
Triadic
The complementary color of green is #800080, which is purple.
Click a color to copy its hex code.
Colors similar to green
- Forest green#228B22
Slightly lighter
- Sea green#2E8B57
Slightly lighter, more cyan, more muted
- Dark green#006400
Darker
- Dark olive green#556B2F
Slightly darker, more yellow, more muted
- Olive drab#6B8E23
Lighter, more yellow, more muted
- Olive#808000
Lighter, more yellow, more muted
Each compared with green.
About this color
Green in CSS and design
Green is one of the 16 basic color keywords, which come from the VGA palette by way of HTML. These four lines all give the same green:
color: green;
color: #008000;
color: rgb(0, 128, 0);
color: hsl(120, 100%, 25%);What to know about green
CSS green is #008000, the green channel at half strength, which is darker than many people expect. The X11 color list, where most CSS names come from, uses green for the bright #00FF00 instead; CSS calls that one lime. Unlike lime (1.37:1), CSS green passes WCAG AA as text on white, at 5.13:1.
Frequently asked questions
What is the hex code for green?
#008000. In CSS you can also use the keyword green, which works in every browser.
What is green in RGB and HSL?
In RGB it is rgb(0, 128, 0) and in HSL hsl(120, 100%, 25%). In CMYK it is about C100 M0 Y100 K50, though printed colors vary with paper and ink.
Should I use black or white text on green?
White text works better: it has a contrast ratio of 5.13:1 and passes WCAG AA. Black text reaches 4.08:1.
What is the complementary color of green?
#800080, which is purple. It sits opposite green on the color wheel: the hue turned 180 degrees, with the same saturation and lightness.
Which colors go with green?
For strong contrast, pair it with its complementary color #800080. For a calmer look, combine it with its analogous neighbors #408000 and #008040. The palette generator builds more combinations.