CSS color names · Greens

Green color: hex #008000, RGB and HSL

Green is the CSS keyword green, hex #008000, rgb(0, 128, 0), hsl(120, 100%, 25%). It is a dark, fully saturated green in the greens family. Below: the colors that go with it, its tints and shades, how it reads as text, and a complete interface palette built from it.

CSS name
green
Hex
#008000
RGB
rgb(0, 128, 0)
HSL
hsl(120, 100%, 25%)
On white
5.14:1 — passes AA for body text
On black
4.09:1 — large text and UI only (3:1)
.example {
  color: green;          /* keyword */
  color: #008000;          /* hex */
  color: rgb(0, 128, 0); /* rgb */
  color: hsl(120, 100%, 25%); /* hsl */
}

What colors go with green

Each match keeps green's saturation and lightness and rotates only the hue, so the relationship is the wheel's and nothing else. Any of these can be an accent beside green as the primary; the harmony guides explain which rule suits which interface.

Complementary

The opposite hue, 180° away — the strongest contrast, best kept to one accent per screen.

Split-complementary

The two neighbors of the complement, at 150° and 210° — most of the contrast with less tension, and two accents instead of one.

#400080
#800040

Triadic

Two hues at 120° and 240° — three evenly spaced signals, the scheme charts and category colors want.

Analogous

The neighbors at −30° and +30° — calm and cohesive, with emphasis coming from weight and size rather than hue.

#408000
#008040

Tints and shades of green

Tints add lightness toward white; shades remove it toward black. The hue and saturation stay fixed, so every step still reads as green — these are the hover, pressed, disabled and surface variants a single brand color needs.

Tints (lighter)

#00c000
#00ff00 · lime
#40ff40
#80ff80
#bfffbf

Shades (darker)

#006b00
#005500
#004000
#002b00
#001500

A UI color palette built from green

The eight semantic roles an interface actually uses, derived from green as the primary with the split-complementary rule: secondary and accent rotate around the wheel, and the five neutrals take the hue at lightness steps tuned for light and dark mode. This is the same derivation the palette generator runs — open it there to change the rule, drag the anchors, or export the set as CSS variables.

Light mode
primary
#008000
secondary
#400080
accent
#800040
background
#fcfdfc
surface
#f3f7f3
text
#112211
muted
#568f56
border
#dfecdf
Dark mode
primary
#1aff1a
secondary
#8c1aff
accent
#ff1a8c
background
#0e1b0e
surface
#152815
text
#f3f6f3
muted
#94b894
border
#274927

Using green in an interface

Green means success and 'on' — reserve one green for that job before you use another as a brand color. Sea green, forest green and teal are calm enough to lead a palette; the neon greens are for dark-mode accents and little else. Whichever role green takes, define it once as a token rather than repeating the keyword: the semantic palette guide covers the eight roles, and the guides to complementary, triadic and the other color schemes explain how to weight the matches above.

What is the hex code for Green?
Green is #008000. In CSS the keyword green, the hex #008000, rgb(0, 128, 0) and hsl(120, 100%, 25%) all paint the same color.
What colors go with Green?
Its complement is #800080, the split-complementary pair is #400080 and #800040, the triadic partners are #000080 and #800000, and the analogous neighbors are #408000 and #008040. In an interface, use Green for most colored elements and one of these for a single accent, at roughly an 80/20 split.
What is the opposite of Green on the color wheel?
The opposite (complementary) color is #800080, the same saturation and lightness rotated 180° around the HSL wheel. Complementary pairs give the strongest contrast, which is why the complement should be used sparingly rather than at equal weight.
Can I use Green for text?
Green as text on white has a contrast ratio of 5.14:1, which passes WCAG AA for body text (4.5:1). On black it is 4.09:1, which fails for body text. It works as a text color on light surfaces.

Similar named colors

More greens

We'd like to use Google cookies to understand how Nodlume is used and to measure our advertising. Nothing loads until you choose, and declining does not affect anything in the app.