Inspect OliveDrab (#6B8E23) in HEX, RGB, HSL, LCH and OKLCH, check its contrast, and copy the value you need.
OliveDrab
#6B8E23
Black text reads best on this background, at 5.52:1.
OliveDrab is one of the 148 CSS named colors, and resolves to #6B8E23 in every browser. In numbers that is rgb(107, 142, 35) and hsl(80, 60%, 35%). Perceptually it is a mid-toned, moderately saturated color: OKLCH puts its lightness at 60% and its chroma at 0.137. It sits in the greens at 126 degrees of OKLCH hue, and reads as a warm color.
White text only reaches 3.81:1 here, so black text is the safer pairing at 5.52:1. That combination of lightness and chroma makes it a workable mid-tone, the kind of value that lands in the middle of a shade scale.
The closest CSS named colors to OliveDrab, measured with CIEDE2000, are Olive (#808000), ForestGreen (#228B22), Green (#008000). If OliveDrab is not quite right, those are the nearest keywords to try before reaching for a custom value.
HEX
#6B8E23
RGB
rgb(107, 142, 35)
HSL
hsl(80, 60%, 35%)
HWB
hwb(80 14% 44%)
CMYK
cmyk(25%, 0%, 75%, 44%)
LAB
lab(54.83 -24.55 49.01)
LCH
lch(54.83 54.81 116.61)
OKLCH
oklch(59.95% 0.1374 126.32)
WCAG asks for 4.5:1 between body text and its background. On #6B8E23 white text measures 3.81:1 and black text 5.52:1, so black clears it and white does not.
White text on OliveDrab
WCAG 2.2
3.81:1
APCA
Lc 70
Fails AA body text
Fails AAA body text
Passes AA large text
Black text on OliveDrab
WCAG 2.2
5.52:1
APCA
Lc 38
Passes AA body text
Fails AAA body text
Passes AA large text
Check OliveDrab against any other color in the contrast checker.
OliveDrab sits at 60% OKLCH lightness. Holding its hue and chroma and moving only that value carries it up to #F0FFDC and down to #040700, which keeps the family recognizable instead of letting it drift toward gray the way a plain HSL ramp does.
#81A63F
20% lighter
#98BE58
40% lighter
#B0D770
60% lighter
#C8F089
80% lighter
#F0FFDC
100% lighter
#517000
20% darker
#3B5300
40% darker
#263700
60% darker
#131E00
80% darker
#040700
100% darker
Build a full accessible scale from #6B8E23 in the shade generator.
Hues rotated around #6B8E23 in OKLCH, then pulled back into the sRGB gamut. Each swatch is labelled with the nearest CSS named color so you have a keyword to start from.
OliveDrab sits at 126 degrees. Rotating it a half turn lands on 306 degrees, the hue directly opposite. It is the strongest pairing you can make without changing lightness, and the one most likely to vibrate if you use both at full chroma.
The neighbors of OliveDrab at 96 and 156 degrees. They stay close enough to read as the same family, which is what you want for hover states, secondary surfaces and gradients.
126, 246 and 6 degrees divide the wheel into thirds. Balanced enough to carry a whole palette without one color dominating the other two.
Instead of the complement at 306 degrees, this pair flanks it at 276 and 336. You keep most of the contrast of a complementary pairing while losing the harshness.
Explore more combinations around OliveDrab on the color wheel.
The biggest shift is under achromatopsia, where #6B8E23 reads as #7F7F7F, 25.2 CIEDE2000 units away. If OliveDrab is the only thing marking a state or a series, roughly one viewer in twelve will miss it.
Protanopia
#9F7F1E
Deuteranopia
#9A7F27
Tritanopia
#75816D
Achromatopsia
#7F7F7F
The nearest CSS keywords to #6B8E23, ranked by perceptual distance rather than by how close their hex digits happen to look.