Green Hex Code #008000
Green is a medium, strong color with the hex code #008000. In RGB it is 0, 128, 0, and in HSL it is 120°, 100%, 25%. It is one of the 148 named colors in CSS, so you can write “green” instead of the hex code.
- HEX
- #008000
- RGB
- rgb(0, 128, 0)
- HSL
- hsl(120, 100%, 25%)
- HSV
- hsv(120°, 100%, 50%)
- CMYK
- cmyk(100%, 0%, 100%, 50%)
- CSS name
- green
CMYK is a simple screen-to-print estimate. Real print results depend on the printer and paper.
About Green
On a white background Green has a contrast ratio of 5.14:1 (AA), and on black 4.09:1 (AA Large). White text is the better choice on top of it.
It sits between the warm and cool halves of the color wheel, so it pairs comfortably with either.
Green suggests growth, health and success, so it is common for confirmations, finance and eco brands. Check text contrast carefully, because many mid-tone greens fall short of the WCAG minimum with white text.
Good to know: The CSS keyword green (#008000) is much darker than the pure green most people picture. The fully saturated #00ff00 is called lime.
Shades and tints of Green
Tints mix Green with white and shades mix it with black, in steps of 20%. Select a swatch to copy its hex code.
Color harmonies for Green
These schemes are calculated from Green on the RGB (screen) color wheel. Select a swatch to copy it, or open any scheme in the color wheel to adjust it.
On the artist’s RYB wheel, the complement of Green is #800000, close to the named color Maroon.
Green contrast and accessibility
WCAG asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (AA), and 7:1 and 4.5:1 for AAA. This is how Green scores against white and black.
| Against | Ratio | AA normal | AA large | AAA normal | AAA large |
|---|---|---|---|---|---|
| White (#ffffff) | 5.14:1 | ✓ Pass | ✓ Pass | ✕ Fail | ✓ Pass |
| Black (#000000) | 4.09:1 | ✕ Fail | ✓ Pass | ✕ Fail | ✕ Fail |
Green and color blindness
These are approximate previews of how Green can look with the main types of color vision deficiency.
Green changes noticeably.
Green changes noticeably.
Green changes noticeably.
Green changes noticeably.
Gradients with Green
Three ready-made starting points. Copy the CSS, or open one in the generator to edit the stops and check contrast.
Green to a lighter tint
background: linear-gradient(135deg, #008000 0%, #99cc99 100%); Green to its analogous neighbour
background: linear-gradient(135deg, #008000 0%, #008040 100%); Green to its complement
background: linear-gradient(135deg, #008000 0%, #800080 100%); Colors similar to Green
How each close match differs from Green.
Use Green in code
.element {
color: #008000;
background-color: #008000;
border-color: green; /* green is a valid CSS color name */
} :root {
--color-green: #008000;
} <!-- Tailwind arbitrary values -->
<div class="bg-[#008000] text-[#008000] border-[#008000]"></div>
/* Tailwind v4 theme color */
@theme {
--color-green: #008000;
} Green questions
What is the hex code for Green?
The hex code for Green is #008000. In RGB that is rgb(0, 128, 0), and in HSL it is hsl(120, 100%, 25%).
What is the complementary color of Green?
On the RGB (screen) color wheel, the complement of Green is #800080, which is close to Purple. On the artist’s RYB wheel it is #800000, close to Maroon.
Should I use white or black text on Green?
White text. It has a contrast ratio of 5.14:1 against Green, which is WCAG AA. The other option scores 4.09:1.
Is Green accessible as a text color on white?
Yes. Green on white scores 5.14:1, which passes WCAG AA for normal text (4.5:1).
What are darker and lighter shades of Green?
Mixing Green with black gives #006600, #004D00, #003300, #001A00 (20% to 80% black). Mixing it with white gives #339933, #66B366, #99CC99, #CCE6CC (20% to 80% white).