Skip to content

Green

Green is a dark, vivid color from the green family. Hex code #008000.

Green#008000

Color codes

  • CSS namegreen
  • HEX#008000
  • RGBrgb(0 128 0)
  • HSLhsl(120 100% 25%)
  • HSB / HSVhsb(120, 100%, 50%)
  • OKLCHoklch(52% 0.177 142.5)
  • CMYKcmyk(100%, 0%, 100%, 50%)

White text

5.13:1 · passes WCAG AA

Black text

4.08:1 · passes WCAG AA for large text only

Shades

50#D8FED4
100#8AF182
200#6DD466
300#4FB749
400#309A2B
500#1D7D19
600#046103
700#004500
800#002B00

Complementary

#008000
#963BA3

Analogous

#008000
#6A6F00
#177A63

Triadic

#008000
#2C61CD
#B92C36

About this color

Green in CSS and design

Green is a dark, vivid color from the green family. Green is one of the 16 basic color keywords, which go back to HTML 4, long before CSS had 148 named colors.

CSS green is #008000, a darker green than many people expect. The pure, bright green #00FF00 is called lime.

Use it in CSS by name or by any of its codes; these all give the same color:

color: green;
color: #008000;
color: rgb(0 128 0);
color: hsl(120 100% 25%);

For text on green, white reads best. Check other combinations with the contrast checker, or browse all CSS color names.

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), in HSL hsl(120 100% 25%). For print, cmyk(100%, 0%, 100%, 50%) is a starting point, but CMYK depends on paper and ink, so check with your printer.

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.

Which colors go with green?

Its complementary color is #963BA3, on the opposite side of the color wheel. For a calmer look, combine it with its analogous neighbors #6A6F00 and #177A63. The palette generator builds more combinations.