Skip to content

Green

Green is a dark, vivid color. Hex code #008000.

Green#008000

Green color codes

  • CSS namegreen
  • HEX#008000
  • RGBrgb(0, 128, 0)
  • HSLhsl(120, 100%, 25%)
  • OKLCHoklch(52% 0.177 142.5)
HSB and CMYK values
  • HSB / HSVhsb(120, 100%, 50%)
  • CMYKC100 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

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.