Skip to content

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.

DarkGreen#006400

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

Color codes for DarkGreen
CSS keyworddarkgreen
HEX#006400
RGBrgb(0, 100, 0)
HSLhsl(120, 100%, 20%)
HWBhwb(120 0% 61%)
OKLCHoklch(43.6% 0.148 142.5)
CMYK (naive, no ICC profile)cmyk(100%, 0%, 100%, 61%)
Decimal25,600
Hue familyGreens

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.

Contrast and accessibility
PairRatioAAAA largeAAAAAA largeAPCA Lc
Black text on darkgreen2.82:1FailFailFailFail18.9
White text on darkgreen7.43:1PassPassPassPass−90.0
Darkgreen text on white7.43:1PassPassPassPass85.1
Darkgreen text on black2.82:1FailFailFailFail−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)

  1. 5%
    #0d6c0d
  2. 15%
    #267b26
  3. 25%
    #408b40
  4. 35%
    #599a59
  5. 45%
    #73aa73
  6. 55%
    #8cb98c
  7. 65%
    #a6c9a6
  8. 75%
    #bfd8bf
  9. 85%
    #d9e8d9
  10. 95%
    #f2f7f2

Shades (mixed with black)

  1. 5%
    #005f00
  2. 15%
    #005500
  3. 25%
    #004b00
  4. 35%
    #004100
  5. 45%
    #003700
  6. 55%
    #002d00
  7. 65%
    #002300
  8. 75%
    #001900
  9. 85%
    #000f00
  10. 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.

Color harmonies
HarmonyRotationColor
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

Nearest CSS named colors
ColorHEXΔE OK
green#0080008.8
darkolivegreen#556b2f9.0
forestgreen#228b2212.3

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
green-800#0166303.8
lime-800#3c63004.0
lime-900#35530e6.2

Code snippets

CSS
.element {
  color: darkgreen;
  background-color: #006400;
  border-color: rgb(0 100 0);
  outline-color: oklch(43.6% 0.148 142.5);
}
Tailwind CSS
<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 */
SwiftUI
import SwiftUI

extension Color {
  static let darkgreen = Color(red: 0.000, green: 0.392, blue: 0.000)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

val Darkgreen = Color(0xFF006400)
Flutter
import 'package:flutter/material.dart';

const darkgreen = Color(0xFF006400);
Android XML
<!-- 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.