Green
Hex #008000, rgb(0 128 0). A green CSS named color.
Open in palette generatorGreen color codes
Click any value to copy it.
- HEX
- RGB
- HSL
- HSV
- HWB
- CMYK
- OKLCH
- OKLab
- Lab
- LCH
- CSS keyword
About Green
Green is a medium saturated green with the hex code #008000. In RGB it is made of 0 red, 128 green and 0 blue; in HSL its hue is 120°, with 100% saturation and 25% lightness. Its perceptual lightness (OKLCH L) is 52.0%.
It is a CSS named color, so you can write "green" anywhere CSS accepts a color. Against white it has a contrast ratio of 5.14:1 and against black 4.09:1, so white text reads better on it and passes WCAG AA for normal text.
Tints, shades and tones
Green mixed step by step with white, black and middle gray (#808080).
Tints (with white)
Shades (with black)
Tones (with gray)
Green 50-950 scale
A Tailwind-style scale built in OKLCH; the original color sits on the step with the closest lightness.
Colors that go with Green
Color harmonies rotate the hue in OKLCH and keep the lightness and chroma. Each color links to its closest named color.
Complementary
Analogous
Triadic
Split complementary
Contrast and readability
WCAG 2 contrast of Green with white and black. The readable text color on Green is white.
On white5.14:1
- AA pass
- AA Large pass
- AAA fail
- UI 3:1 pass
APCA Lc 75
On black4.09:1
- AA fail
- AA Large pass
- AAA fail
- UI 3:1 pass
APCA Lc -27
Test any pair in the contrast checker.
Color blindness preview
How Green appears with each type of color vision deficiency (simulated with the Machado model).
- Protanopia#837200
- Deuteranopia#776A18
- Tritanopia#007C6C
- Protanomaly#717500
- Deuteranomaly#6B7013
- Tritanomaly#007E4A
- Achromatopsia#6D6D6D
Colors similar to Green
The closest named colors by perceptual difference (OKLab).
Use Green in CSS and Tailwind
.green {
color: green; /* #008000 */
background-color: rgb(0 128 0);
border-color: oklch(52% 0.177 142.5);
}/* Tailwind CSS v4: bg-green-500, text-green-700... */
@theme {
--color-green-50: #F5FDF4;
--color-green-100: #E2F5E0;
--color-green-200: #C7E9C3;
--color-green-300: #99D893;
--color-green-400: #58BF51;
--color-green-500: #22AD1E;
--color-green-600: #009900;
--color-green-700: #008000;
--color-green-800: #086506;
--color-green-900: #0B5109;
--color-green-950: #001D00;
}
<!-- or the exact color, no config -->
<div class="bg-[#008000] text-[#FFFFFF]">…</div>