Inspect Olive (#808000) in HEX, RGB, HSL, LCH and OKLCH, check its contrast, and copy the value you need.
Olive
#808000
Black text reads best on this background, at 5.01:1.
Olive is one of the 148 CSS named colors, and resolves to #808000 in every browser. In numbers that is rgb(128, 128, 0) and hsl(60, 100%, 25%). Perceptually it is a mid-toned, moderately saturated color: OKLCH puts its lightness at 58% and its chroma at 0.127. It sits in the yellows at 110 degrees of OKLCH hue, and reads as a warm color.
White text only reaches 4.2:1 here, so black text is the safer pairing at 5.01: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 Olive, measured with CIEDE2000, are OliveDrab (#6B8E23), DarkOliveGreen (#556B2F), DarkGoldenRod (#B8860B). If Olive is not quite right, those are the nearest keywords to try before reaching for a custom value.
HEX
#808000
RGB
rgb(128, 128, 0)
HSL
hsl(60, 100%, 25%)
HWB
hwb(60 0% 50%)
CMYK
cmyk(0%, 0%, 100%, 50%)
LAB
lab(52.15 -9.45 56.02)
LCH
lch(52.15 56.82 99.57)
OKLCH
oklch(58.07% 0.1266 109.77)
WCAG asks for 4.5:1 between body text and its background. On #808000 white text measures 4.2:1 and black text 5.01:1, so black clears it and white does not.
White text on Olive
WCAG 2.2
4.2:1
APCA
Lc 74
Fails AA body text
Fails AAA body text
Passes AA large text
Black text on Olive
WCAG 2.2
5.01:1
APCA
Lc 35
Passes AA body text
Fails AAA body text
Passes AA large text
Check Olive against any other color in the contrast checker.
Olive sits at 58% OKLCH lightness. Holding its hue and chroma and moving only that value carries it up to #FCFFB0 and down to #060600, which keeps the family recognizable instead of letting it drift toward gray the way a plain HSL ramp does.
#98982D
20% lighter
#B0B24A
40% lighter
#C9CB64
60% lighter
#E3E67E
80% lighter
#FCFFB0
100% lighter
#646400
20% darker
#4A4A00
40% darker
#313100
60% darker
#1A1A00
80% darker
#060600
100% darker
Build a full accessible scale from #808000 in the shade generator.
Hues rotated around #808000 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.
Olive sits at 110 degrees. Rotating it a half turn lands on 290 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 Olive at 80 and 140 degrees. They stay close enough to read as the same family, which is what you want for hover states, secondary surfaces and gradients.
110, 230 and 350 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 290 degrees, this pair flanks it at 260 and 320. You keep most of the contrast of a complementary pairing while losing the harshness.
Explore more combinations around Olive on the color wheel.
The biggest shift is under tritanopia, where #808000 reads as #976D59, 26.6 CIEDE2000 units away. If Olive is the only thing marking a state or a series, roughly one viewer in twelve will miss it.
Protanopia
#9A7300
Deuteranopia
#9D7A04
Tritanopia
#976D59
Achromatopsia
#777777
The nearest CSS keywords to #808000, ranked by perceptual distance rather than by how close their hex digits happen to look.