CSS named color
DarkGreen #006400
DarkGreen (CSS keyword darkgreen) has the hex code #006400 and the RGB value rgb(0, 100, 0): a dark, moderately saturated green.
Dark green (#006400) has 100 in the green channel, darker than CSS green (#008000). It is one of the few named greens dark enough for small text on white.
Color codes for DarkGreen
| CSS keyword | darkgreen |
|---|---|
| HEX | #006400 |
| RGB | rgb(0, 100, 0) |
| HSL | hsl(120, 100%, 20%) |
| HWB | hwb(120 0% 61%) |
| OKLCH | oklch(43.6% 0.148 142.5) |
| CMYK (naive, no ICC profile) | cmyk(100%, 0%, 100%, 61%) |
| Decimal | 25,600 |
| Hue family | Greens |
Contrast and accessibility
On darkgreen, white text has a contrast ratio of 7.43:1 and passes AAA at any text size; black text reaches 2.82:1.
WCAG 2.2 contrast ratios (success criteria 1.4.3 and 1.4.6: AA needs 4.5:1 for normal text and 3:1 for large text, AAA needs 7:1 and 4.5:1). APCA Lc is the lightness contrast from the APCA-W3 0.0.98G model proposed for WCAG 3; a higher absolute value is more readable, and Lc 75 is its suggested minimum for body text.
| Pair | Ratio | AA | AA large | AAA | AAA large | APCA Lc |
|---|---|---|---|---|---|---|
| Black text on darkgreen | 2.82:1 | Fail | Fail | Fail | Fail | 18.9 |
| White text on darkgreen | 7.43:1 | Pass | Pass | Pass | Pass | −90.0 |
| Darkgreen text on white | 7.43:1 | Pass | Pass | Pass | Pass | 85.1 |
| Darkgreen text on black | 2.82:1 | Fail | Fail | Fail | Fail | −16.9 |
Tints and shades
Each step mixes darkgreen with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, darkgreen, white 25%) in CSS.
Tints (mixed with white)
- 5%
#0d6c0d - 15%
#267b26 - 25%
#408b40 - 35%
#599a59 - 45%
#73aa73 - 55%
#8cb98c - 65%
#a6c9a6 - 75%
#bfd8bf - 85%
#d9e8d9 - 95%
#f2f7f2
Shades (mixed with black)
- 5%
#005f00 - 15%
#005500 - 25%
#004b00 - 35%
#004100 - 45%
#003700 - 55%
#002d00 - 65%
#002300 - 75%
#001900 - 85%
#000f00 - 95%
#000500
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, darkgreen's complementary color is #762D80 (close to purple), its analogous colors are #535700 and #00634B, and its triadic partners are #214BA2 and #922028. For text on top, white gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #762d80 |
| Analogous | −30°, +30° | #535700#00634b |
| Triadic | +120°, +240° | #214ba2#922028 |
| Split-complementary | +150°, +210° | #573b9a#8a2259 |
Computed in OKLCH: the hue is rotated by 180° (complementary), ±30° (analogous), ±120° (triadic) and 180° ±30° (split-complementary) while lightness and chroma stay fixed. Results that fall outside sRGB are brought back with the CSS Color 4 gamut mapping algorithm. Because this uses OKLCH, the values differ from tools that rotate hue in HSL, but every color keeps the same perceived lightness.
Warm or cool?
DarkGreen is a cool color: its hue is 120° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.
Nearest named and Tailwind colors
Distance is ΔE OK, the Euclidean distance in OKLab multiplied by 100. Values under about 2 are hard to tell apart side by side.
Nearest CSS named colors
| Color | HEX | ΔE OK |
|---|---|---|
| green | #008000 | 8.8 |
| darkolivegreen | #556b2f | 9.0 |
| forestgreen | #228b22 | 12.3 |
Code snippets
.element {
color: darkgreen;
background-color: #006400;
border-color: rgb(0 100 0);
outline-color: oklch(43.6% 0.148 142.5);
}<div class="bg-[#006400] text-white">...</div>
/* or register it once in your CSS (Tailwind v4) */
@theme {
--color-darkgreen: #006400;
}
/* then use bg-darkgreen, text-darkgreen, border-darkgreen */import SwiftUI
extension Color {
static let darkgreen = Color(red: 0.000, green: 0.392, blue: 0.000)
}import androidx.compose.ui.graphics.Color
val Darkgreen = Color(0xFF006400)import 'package:flutter/material.dart';
const darkgreen = Color(0xFF006400);<!-- res/values/colors.xml -->
<color name="darkgreen">#006400</color>Frequently asked questions
- What is the hex code for darkgreen?
- The hex code for darkgreen is #006400. The same color is rgb(0, 100, 0), hsl(120, 100%, 20%) and oklch(43.6% 0.148 142.5), and in CSS you can also write the keyword darkgreen directly.
- Is darkgreen a warm or cool color?
- DarkGreen is a cool color: its hue is 120° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.
- What colors go with darkgreen?
- Rotating the hue in OKLCH while keeping lightness and chroma, darkgreen's complementary color is #762D80 (close to purple), its analogous colors are #535700 and #00634B, and its triadic partners are #214BA2 and #922028. For text on top, white gives the higher contrast.
- Can you use white text on darkgreen?
- White text on darkgreen has a contrast ratio of 7.43:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 2.82:1 and fails AA even for large text. In APCA terms that is Lc −90.0 for white and Lc 18.9 for black.
- What is the RGB value of darkgreen?
- DarkGreen is rgb(0, 100, 0): red 0, green 100 and blue 0 on the 0 to 255 scale, or 0.0%, 39.2% and 0.0%. As a decimal integer it is 25600.
Last reviewed by Arielton Oberek.