Green Color

HEX #008000 · rgb(0, 128, 0) · hsl(120, 100%, 25%)

Green color codes

Green is one of the named colors every browser understands. In CSS you can write it as green or #008000.

FormatValue
HEX#008000
RGBrgb(0, 128, 0)
HSLhsl(120, 100%, 25%)
CMYK100%, 0%, 100%, 50%
CSS namegreen
.example {
  color: green;
  background-color: #008000;
  border-color: rgb(0, 128, 0);
}

Colors that go with green

These harmonies keep the same saturation and lightness and rotate the hue around the color wheel.

#800080Complementary
Purple
#408000Analogous
#008040Analogous
#000080Triadic
Navy
#800000Triadic
Maroon

Tints and shades of green

Tints mix the color with white; shades mix it with black.

#E6F2E690% white
#BFDFBF75% white
#99CC9960% white
#73B97345% white
#4DA64D30% white
#26932615% white
#008000Base
Green
#006D0015% black
#005A0030% black
#00460045% black
#00330060% black
#00200075% black
#000D0090% black

Contrast and readability

Black text
4.09:1
large text only
White text
5.14:1
passes AA

Use white text on green. Ratios follow the WCAG 2 formula; AA needs 4.5:1 for normal text and 3:1 for large text.

Frequently asked questions

What is the hex code for green?

The hex code for green is #008000.

What is the RGB value of green?

Green is rgb(0, 128, 0): 0 red, 128 green and 0 blue on a 0 to 255 scale.

What color goes with green?

Its complementary color is #800080, which is closest to the named color purple. Analogous and triadic matches are listed on this page.

Should text on green be black or white?

Use white text. The contrast ratio is 4.09:1 with black and 5.14:1 with white. WCAG AA asks for at least 4.5:1 for normal text.

Similar named colors

Pick any other color with the color picker, or browse all named colors.