CSS named color

Dark Green #006400

The CSS keyword darkgreen is #006400. It is a dark soft green in the green family. In OKLCH it sits at lightness 0.436, chroma 0.148 and hue 142.5°.

Relative luminance
0.0911
OKLCH L · C · h
0.436 · 0.148 · 142.5
Best text
White 7.43:1
Hue family
Green

#006400 color codes

HEX
#006400
RGB
rgb(0, 100, 0)
HSL
hsl(120, 100%, 20%)
OKLCH
oklch(0.436 0.148 142.5)
OKLab
oklab(0.436 -0.118 0.090)
CIELAB (D65)
L* 36.20, a* -43.37, b* 41.86
XYZ (D65)
X 4.56, Y 9.11, Z 1.52
CMYK (naive)
cmyk(100%, 0%, 100%, 61%)

CIELAB and XYZ use the D65 white point; CSS lab() uses D50, so paste the OKLCH or HEX value into stylesheets. CMYK here is a plain formula with no press profile.

Legibility

Contrast: is #006400 accessible?

White text on it reaches 7.43:1, passing AAA. Black text fails at 2.82:1.

WCAG 2 gives the same ratio whichever color is the text; APCA does not, so its Lc changes sign and size with polarity.

Open the Contrast System
  • Black text on it

    2.82:1

    • AA fails
    • AA large fails
    • AAA fails
    • APCA Lc +18
  • White text on it

    7.43:1

    • AA passes
    • AA large passes
    • AAA passes
    • APCA Lc −90
  • As text on black

    2.82:1

    • AA fails
    • AA large fails
    • AAA fails
    • APCA Lc −16
  • As text on white

    7.43:1

    • AA passes
    • AA large passes
    • AAA passes
    • APCA Lc +85

Nearest versions that pass 4.5:1

  • For text on white

    #006400 7.43:1

    It already reaches 7.43:1 on white, so no change is needed.

  • For text on black

    #31852D 4.52:1

    Lightening its OKLCH lightness from 0.44 to 0.55 reaches 4.52:1 on black, keeping the hue.

Checking another pair? Use the Contrast Checker.

Studio

Adjust #006400 live

Move lightness, chroma and hue in OKLCH, or drag on the map. The map is every lightness and chroma at the current hue: sRGB inside the solid area, Display P3 out to the dashed line.

The studio needs JavaScript.

Scale

Shades and tints of #006400

Eleven OKLCH lightness steps at this hue, each with its contrast against white and black. #006400 sits at step 700.

  1. 50#E1FFDE
    White
    1.07
    Black
    19.56
  2. 100#BFFFB9
    White
    1.15
    Black
    18.21
  3. 200#A4EE9D
    White
    1.37
    Black
    15.29
  4. 300#86D480
    White
    1.78
    Black
    11.74
  5. 400#67B861
    White
    2.44
    Black
    8.60
  6. 500#499C44
    White
    3.43
    Black
    6.12
  7. 600#30832B
    White
    4.76
    Black
    4.40
  8. 700This color#006400
    White
    7.43
    Black
    2.82
  9. 800#004F00
    White
    9.91
    Black
    2.11
  10. 900#003400
    White
    14.08
    Black
    1.49
  11. 950#001D00
    White
    17.86
    Black
    1.17

Under each step, white and black text on it; a bold figure passes 4.5:1.

Gamut

How vivid #006400 can get

At its lightness and hue, sRGB reaches OKLCH chroma 0.149; #006400 uses 100% of it. Display P3, which many recent phones and laptops show, reaches 0.175 there: 18% more.

0.00.20.40.60.80.20.40.60.8 460480500520540560580600620
  • sRGB
  • Display P3
  • Rec. 2020
  • Dominant wavelength
OKLCH chroma
0.148
sRGB edge
0.149
Display P3 edge
0.175
Rec. 2020 edge
0.182
Dominant wavelength
549 nm
Excitation purity
73%
Chromaticity
x 0.3000, y 0.6000
  • This color#006400
  • Most vivid in sRGB#006400
  • Most vivid in Display P3oklch(0.436 0.175 142.5)

On a screen without Display P3 the last tile shows the sRGB edge instead.

Use the wider color where screens show it
.accent {
  color: #006400;
}
@media (color-gamut: p3) {
  .accent { color: color(display-p3 0.116 0.3951 0); }
}

Mixing

Mixing #006400

Each row is the same mix worked out in a different space, with the halfway color at its end. sRGB, which older CSS gradients use, can sag gray or dark in the middle; OKLab keeps the lightness steps even; OKLCH holds chroma and hue as it goes.

White #FFFFFF

  • sRGB50%#80B280
  • OKLab50%#89B086
  • OKLCH50%#89B086

Black #000000

  • sRGB50%#003200
  • OKLab50%#002200
  • OKLCH50%#002200

Its complement #762D80

  • sRGB50%#3B4940
  • OKLab50%#515151
  • OKLCH50%#7F3C00
In CSS
/* A gradient and a mix, worked out in OKLCH */
background: linear-gradient(in oklch, #006400, white);
color: color-mix(in oklch, #006400 50%, white);

In use

#006400 in an interface

A button, a link, a heading, a focused field, an icon and a chart line in this color, on a light page and a dark one. Each check is a WCAG 2 contrast minimum: 1.4.3 for text, 1.4.11 for the rest.

Light page

  • Button labelText, 4.5:17.43:1 Passes
  • Link and body-size textText, 4.5:17.43:1 Passes
  • Large headingLarge text, 3:17.43:1 Passes
  • Icons, borders and focus ringsNon-text, 3:17.43:1 Passes

Dark page

  • Button labelText, 4.5:17.43:1 Passes
  • Link and body-size textText, 4.5:12.51:1 Fails
  • Large headingLarge text, 3:12.51:1 Fails
  • Icons, borders and focus ringsNon-text, 3:12.51:1 Fails

For text on this page, the nearest shade that passes is #3B8E36 4.55:1

Color vision

How #006400 looks with color blindness

Achromatopsia changes it most, ΔE2000 25.9; tritanopia changes it least, 19.5.

Simulated with Machado et al. (2009) at full severity, in linear light.

Simulate a whole page What each type sees
  • Protanopia

    No working red (long-wavelength) cones

    #665900 ΔE2000 21.3

    Distinct

    Reads as dark muted brown

  • Deuteranopia

    No working green (medium-wavelength) cones

    #5D5311 ΔE2000 20.1

    Distinct

    Reads as dark muted yellow

  • Tritanopia

    No working blue (short-wavelength) cones

    #006154 ΔE2000 19.5

    Distinct

    Reads as dark muted teal

  • Achromatopsia

    No cone color vision; lightness only

    #555555 ΔE2000 25.9

    Distinct

    Reads as dark gray

Pairing check

Checked against its complement, #762D80. Their lightness contrast is only 1.14:1, so where hue collapses, add a label, icon or pattern.

VisionThe pairΔE2000Verdict
Normal vision#006400 · #762D8073.4Stays distinct
Protanopia#665900 · #1B478348.5Stays distinct
Deuteranopia#5D5311 · #384F7E42.3Stays distinct
Tritanopia#006154 · #783A5244.7Stays distinct
Achromatopsia#555555 · #4C4C4C3.1Easily confused

Harmony

Color harmonies for #006400

Its complement is #762D80, a dark soft magenta.

Hue rotations in OKLCH, mapped into sRGB by trimming chroma so hue and lightness stay put.

Open the Harmony Studio
  • Base#006400
  • Complement#762D80

Complementary

Open in Harmony Studio
  • −30°#535600
  • Base#006400
  • +30°#00604C
  • Base#006400
  • +120°#214BA2
  • +240°#922028
  • Base#006400
  • +150°#573B9A
  • +210°#8A2259

Split-complementary

Open in Harmony Studio

Code

Design tokens

Ready-to-paste tokens in six formats. Rename them to fit your system.

CSS custom property

:root {
  --color-darkgreen: #006400;
}

Tailwind config

// tailwind.config.js
module.exports = {
  theme: {
    extend: {
      colors: {
        darkgreen: '#006400',
      },
    },
  },
};

Tailwind v4 theme

/* app.css — Tailwind CSS v4 */
@import "tailwindcss";

@theme {
  --color-darkgreen: oklch(0.436 0.148 142.5);
}

Design token (W3C DTCG)

{
  "color": {
    "darkgreen": {
      "$type": "color",
      "$value": {
        "colorSpace": "srgb",
        "components": [0, 0.3922, 0],
        "hex": "#006400"
      },
      "$description": "CSS named color darkgreen"
    }
  }
}

SwiftUI color

import SwiftUI

enum Palette {
    static let darkgreen = Color(.sRGB, red: 0.000, green: 0.392, blue: 0.000, opacity: 1)
}

Jetpack Compose color

import androidx.compose.ui.graphics.Color

object Palette {
    val Darkgreen = Color(0xFF006400)
}

Matches

The nearest match in each system

The closest CSS name, Tailwind shade, RAL Classic paint and Crayola crayon by ΔE2000; under 2 is hard to tell apart side by side. RAL and Crayola values approximate physical colors.

Tools

Open #006400 in the tools

Each opens over this page. More colors live in the Color Library, and every color page is listed on the hub.