CSS named color
Green #008000
Green is a dark green with the hex code #008000, which converts to rgb(0, 128, 0). Open #008000 in the converter to tweak it.
Green color values
| HEX | #008000 |
|---|---|
| HEX (shorthand) | — |
| RGB | rgb(0, 128, 0) |
| RGBA | rgba(0, 128, 0, 1) |
| 8-digit HEX | #008000FF |
| HSL | hsl(120, 100%, 25%) |
| HSV / HSB | 120°, 100%, 50% |
| CMYK | 100%, 0%, 100%, 50% |
| RGB 0–1 | 0, 0.502, 0 |
| Decimal | 32768 |
| CSS keyword | green |
How #008000 converts to RGB
Split the hex code into three pairs and read each pair as a base-16 number: 00 → 0, 80 → 128, 00 → 0. That gives rgb(0, 128, 0). The step-by-step guide explains the math.
Shades of Green
Mixed toward black in 10% steps. Click a swatch to copy its hex.
Tints of Green
Mixed toward white in 10% steps.
Color harmonies
Hue rotations of Green on the HSL color wheel, keeping saturation and lightness fixed. The color harmony guide explains when each scheme works.
Complementary
Analogous
Split-complementary
Triadic
Tetradic (square)
Contrast and accessibility
| Text | Background | Ratio | WCAG 2.x |
|---|---|---|---|
| White | Green | 5.13:1 | AA |
| Black | Green | 4.08:1 | AA Large only |
Use white text on a green background. Test any other pair in the contrast checker; thresholds are explained in the WCAG contrast guide.
Use Green in CSS
.element {
color: green; /* keyword */
background-color: #008000; /* hex */
border-color: rgb(0 128 0 / 50%); /* 50% transparent */
}
Need it semi-transparent? Append an alpha byte: #00800080 is Green at 50% opacity. See RGBA & transparency.
Similar named colors
FAQ
What is the HEX code for Green?
The CSS named color green is #008000 in hexadecimal. In CSS you can write color: green; or color: #008000; — both produce the same pixel.
What is Green in RGB?
Green is rgb(0, 128, 0): red 0, green 128, blue 0 on the 0–255 scale. As normalized 0–1 floats that is (0, 0.502, 0).
Is white or black text more readable on Green?
White text is more readable. White on #008000 has a contrast ratio of 5.13:1 (AA), black on #008000 has 4.08:1 (AA Large only). WCAG AA needs 4.5:1 for normal text.