CSS named color
Olive Drab #6B8E23
The CSS keyword olivedrab is #6B8E23. It is a soft green in the green family. In OKLCH it sits at lightness 0.599, chroma 0.137 and hue 126.3°.
- Relative luminance
- 0.2259
- OKLCH L · C · h
- 0.599 · 0.137 · 126.3
- Best text
- Black 5.51:1
- Hue family
- Green
#6B8E23 color codes
- HEX
#6B8E23- RGB
rgb(107, 142, 35)- HSL
hsl(80, 60%, 35%)- OKLCH
oklch(0.599 0.137 126.3)- OKLab
oklab(0.599 -0.081 0.111)- CIELAB (D65)
L* 54.65, a* -28.22, b* 49.69- XYZ (D65)
X 16.04, Y 22.59, Z 5.11- CMYK (naive)
cmyk(25%, 0%, 75%, 44%)
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 #6B8E23 accessible?
Black text on it reaches 5.51:1, passing AA. White text manages only 3.80:1, enough for large text only.
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
5.51:1
- AA passes
- AA large passes
- AAA fails
- APCA Lc +38
-
White text on it
3.80:1
- AA fails
- AA large passes
- AAA fails
- APCA Lc −70
-
As text on black
5.51:1
- AA passes
- AA large passes
- AAA fails
- APCA Lc −36
-
As text on white
3.80:1
- AA fails
- AA large passes
- AAA fails
- APCA Lc +65
Nearest versions that pass 4.5:1
-
For text on white
#5E800D 4.59:1
Darkening its OKLCH lightness from 0.60 to 0.55 reaches 4.59:1 on white, keeping the hue.
-
For text on black
#6B8E23 5.51:1
It already reaches 5.51:1 on black, so no change is needed.
Checking another pair? Use the Contrast Checker.
Studio
Adjust #6B8E23 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.
Scale
Shades and tints of #6B8E23
Eleven OKLCH lightness steps at this hue, each with its contrast against white and black. #6B8E23 sits at step 500.
Under each step, white and black text on it; a bold figure passes 4.5:1.
Gamut
How vivid #6B8E23 can get
At its lightness and hue, sRGB reaches OKLCH chroma 0.153; #6B8E23 uses 90% of it. Display P3, which many recent phones and laptops show, reaches 0.179 there: 17% more.
- sRGB
- Display P3
- Rec. 2020
- Dominant wavelength
- OKLCH chroma
- 0.137
- sRGB edge
- 0.153
- Display P3 edge
- 0.179
- Rec. 2020 edge
- 0.185
- Dominant wavelength
- 563 nm
- Excitation purity
- 68%
- Chromaticity
- x 0.3667, y 0.5165
- This color#6B8E23
- Most vivid in sRGB#698F00
- Most vivid in Display P3oklch(0.599 0.179 126.3)
On a screen without Display P3 the last tile shows the sRGB edge instead.
.accent {
color: #6b8e23;
}
@media (color-gamut: p3) {
.accent { color: color(display-p3 0.432 0.5642 0); }
}
Mixing
Mixing #6B8E23
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%#B5C791
- OKLab50%#B2C696
- OKLCH50%#B2C696
Black #000000
- sRGB50%#364712
- OKLab50%#253407
- OKLCH50%#253407
Its complement #9568C0
- sRGB50%#807B72
- OKLab50%#808080
- OKLCH50%#008FA9
/* A gradient and a mix, worked out in OKLCH */
background: linear-gradient(in oklch, #6b8e23, white);
color: color-mix(in oklch, #6b8e23 50%, white);
In use
#6B8E23 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:15.51:1 Passes
- Link and body-size textText, 4.5:13.80:1 Fails
- Large headingLarge text, 3:13.80:1 Passes
- Icons, borders and focus ringsNon-text, 3:13.80:1 Passes
For text on this page, the nearest shade that passes is #5E800D 4.59:1
Dark page
- Button labelText, 4.5:15.51:1 Passes
- Link and body-size textText, 4.5:14.92:1 Passes
- Large headingLarge text, 3:14.92:1 Passes
- Icons, borders and focus ringsNon-text, 3:14.92:1 Passes
Color vision
How #6B8E23 looks with color blindness
Achromatopsia changes it most, ΔE2000 25.2; deuteranopia changes it least, 13.3.
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
#96840D ΔE2000 14.5
Distinct
Reads as soft amber
-
Deuteranopia
No working green (medium-wavelength) cones
#91822D ΔE2000 13.3
Distinct
Reads as soft amber
-
Tritanopia
No working blue (short-wavelength) cones
#708779 ΔE2000 20.1
Distinct
Reads as grayish green
-
Achromatopsia
No cone color vision; lightness only
#838383 ΔE2000 25.2
Distinct
Reads as gray
Pairing check
Checked against its complement, #9568C0. Their lightness contrast is only 1.09:1, so where hue collapses, add a label, icon or pattern.
| Vision | The pair | ΔE2000 | Verdict |
|---|---|---|---|
| Normal vision | #6B8E23 · #9568C0 | 67.7 | Stays distinct |
| Protanopia | #96840D · #527AC3 | 52.9 | Stays distinct |
| Deuteranopia | #91822D · #5D7CBE | 48.7 | Stays distinct |
| Tritanopia | #708779 · #8E778B | 26.5 | Stays distinct |
| Achromatopsia | #838383 · #7C7C7C | 2.7 | Easily confused |
Harmony
Color harmonies for #6B8E23
Its complement is #9568C0, a soft violet.
Hue rotations in OKLCH, mapped into sRGB by trimming chroma so hue and lightness stay put.
Open the Harmony Studio- Base#6B8E23
- Complement#9568C0
Complementary
Open in Harmony Studio- −30°#967F00
- Base#6B8E23
- +30°#1A985D
Analogous
Open in Harmony Studio- Base#6B8E23
- +120°#2886CD
- +240°#C25873
Triadic
Open in Harmony Studio- Base#6B8E23
- +150°#6B76D1
- +210°#B25D9F
Split-complementary
Open in Harmony StudioCode
Design tokens
Ready-to-paste tokens in six formats. Rename them to fit your system.
:root {
--color-olivedrab: #6b8e23;
}
// tailwind.config.js
module.exports = {
theme: {
extend: {
colors: {
olivedrab: '#6b8e23',
},
},
},
};
/* app.css — Tailwind CSS v4 */
@import "tailwindcss";
@theme {
--color-olivedrab: oklch(0.599 0.137 126.3);
}
{
"color": {
"olivedrab": {
"$type": "color",
"$value": {
"colorSpace": "srgb",
"components": [0.4196, 0.5569, 0.1373],
"hex": "#6b8e23"
},
"$description": "CSS named color olivedrab"
}
}
}
import SwiftUI
enum Palette {
static let olivedrab = Color(.sRGB, red: 0.420, green: 0.557, blue: 0.137, opacity: 1)
}
import androidx.compose.ui.graphics.Color
object Palette {
val Olivedrab = Color(0xFF6B8E23)
}
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 #6B8E23 in the tools
Each opens over this page. More colors live in the Color Library, and every color page is listed on the hub.
- Color InspectorEvery format, its names, contrast and color vision in one panel.
- Contrast SystemBlack and white text on this color, with fixes in both directions.
- Harmony StudioPalettes built from this color, walked to a contrast target if you ask.
- Color Space ConverterThe same color in 34 notations, with its gamut headroom.
- Color Name FinderThe nearest of 1,055 color names by ΔE2000.