Skip to content

#5f7d21

a dark, vivid green · warm · closest name: Olive Drab

RGB
95, 125, 33
HSL
80°, 58%, 31%
CMYK
24, 0, 74, 51
Luminance
0.1721

At a glance

Every number on this page in one read: what #5f7d21 is made of, how bright it looks, and which way it leans.

Hex
#5f7d21
Hue
80°
green
Saturation
58%
vivid
Lightness
31%
dark
Brightness
49%
HSV value
Perceived
43%
weighted brightness
Luminance
0.1721
WCAG relative
Temperature
Warm
41/100 cool
Color family
Green
Tone
Vivid
Best ink
White
4.73:1
Closest name
Olive Drab
ΔE2000 6.4
Where it sits
Hue80° of 360°
Saturation58%
Lightness31%
Temperature
Warm ← → Cool41% cool

Reads warm. Warm and cool siblings keep the same lightness, so you can swap one in without redoing your contrast maths.

Every format

HEX#5f7d21
RGBrgb(95, 125, 33)
HSLhsl(80, 58%, 31%)
CMYKcmyk(24%, 0%, 74%, 51%)
LABlab(48.5 -25.0 44.1)
LCHlch(48.5 50.8 119.5)
OKLCHoklch(0.548 0.122 126.0)
Decimal6257953
Display P3color(display-p3 0.373 0.490 0.129)

Copy-ready code

/* CSS */
color: #5f7d21;
background-color: #5f7d21;
/* Tailwind (arbitrary) */
class="text-[#5f7d21] bg-[#5f7d21]"
/* SCSS */
$brand: #5f7d21;
/* SwiftUI */
Color(red: 0.373, green: 0.490, blue: 0.129)
/* Android */
Color.parseColor("#5f7d21")
/* Flutter */
Color(0xFF5F7D21)
/* Python / OpenCV (BGR) */
(33, 125, 95)

Best text color

Only one of black and white can be right. This is the one, with the number that proves it.

Readable at a glance#ffffff on #5f7d21 · 4.73:1
Use #ffffffAA at every size, AAA for large text only.
Aa
White text · 4.73:1 · recommended
AA pass · AA large pass · AAA fail
Aa
Black text · 4.44:1
AA fail · AA large pass · AAA fail
Reading the other direction: #5f7d21 as text scores 4.73:1 on white and 4.44:1 on black.

Accessibility — WCAG contrast

Aa
#5f7d21 on white: 4.73:1
AA ✓ pass · AA-large · AAA
Aa
#5f7d21 on black: 4.44:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #847411
deuteranopia · #807329
tritanopia · #63776B

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #5f7d21 is pinned to step 800; the rest hold its hue and let saturation ease off at the extremes so the pale end never turns neon.

#F9FBF4
#F2F7E9
#E4EFCD
#D2E8A6
#BCDC7A
#A5D04D
#93C233
#7BA12B
#5f7d21
#495E1C
#2D3B12
Base = 800Lightest = 50 · #F9FBF4Darkest = 950 · #2D3B12
:root {
  --brand-50: #F9FBF4;
  --brand-100: #F2F7E9;
  --brand-200: #E4EFCD;
  --brand-300: #D2E8A6;
  --brand-400: #BCDC7A;
  --brand-500: #A5D04D;
  --brand-600: #93C233;
  --brand-700: #7BA12B;
  --brand-800: #5f7d21;
  --brand-900: #495E1C;
  --brand-950: #2D3B12;
  --brand: #5f7d21;
  --brand-ink: #ffffff;
}

Colors that work with #5f7d21

Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.

Text on it#ffffff
White wins here
Surface#F8FAF4
Tinted page background
Border#DEEDC0
Hairlines and dividers
Muted text#819B4B
Captions on the surface
Accent#251E80
Second voice, not a rival
Dark variant#4D651B
Hover, pressed, headers
Light variant#F5FAEB
Selected rows, tints
Dark surface#1F2414
Dark-mode background
Light mode
Everything in its place

Surface, border, heading and body all derive from this one hue, so the screen stays coherent without a second palette.

Primary actionSecondaryBadge
Dark mode
Same hue, inverted

Lightness flips, hue holds. The accent stays the anchor in both themes.

Primary actionSecondaryAccent

How to use #5f7d21

Derived from its contrast, chroma and lightness — not from taste.

Works well for
  • Body text and links on white
  • Primary buttons and calls to action
  • Focus rings, active and selected states
  • Headers, footers and dark-mode surfaces
  • Brand accents, badges and data highlights
Use with care
  • Full-page backgrounds — tiring over long sessions
  • Black text placed on it
  • Pairing with a same-lightness hue — edges vibrate

Similar colors

One move away from this hex in each direction. Every swatch is its own page.

Color relationships

The wheel positions with their names attached, so you can grab the one you actually need.

Complementary#3F217D
Analogous left#7D6D21
Analogous right#317D21
Split-complement 1#21317D
Split-complement 2#6D217D
Triadic 1#215F7D
Triadic 2#7D215F
Tetradic#217D6D

RGB percentages

Red37.3%
Green49.0%
Blue12.9%

CMYK percentages

Cyan24.0%
Magenta0.0%
Yellow73.6%
Key (black)51.0%

Color previews

#5f7d21 text on a black background

contrast 4.44:1

Card sample

#5f7d21 text on a white background

contrast 4.73:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #5f7d21;
Background color
Panel with #5f7d21 background
background-color: #5f7d21;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #5f7d21;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(95, 125, 33, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(95, 125, 33, 0.45);
Border & gradient
Gradient panel
border: 3px solid #5f7d21;
background: linear-gradient(135deg, #5f7d21, #227D21);

Monochromatic scale

Palettes built from #5f7d21

Shades — darker

Tints — lighter

Color harmonies

Nearest named colors

Ranked with CIEDE2000 across all 139 CSS keywords. Under ΔE 2 the eye stops telling them apart; over ΔE 10 they are plainly different colors.

#5f7d21 in the real world

Where a color in this family tends to land, and the interface roles it is usually asked to play.

Industries
SustainabilityFinanceHealth and wellnessAgriculture
Common UI roles
ButtonsLinksFocus statesCharts
Print note

Converts to four-color process without much drama. Proof it anyway.

#5f7d21, answered

What color is #5f7d21?

#5f7d21 is a dark vivid green, closest to Olive Drab (ΔE2000 6.4). It sits at 80° on the hue wheel with 58% saturation and 31% lightness, which reads as warm.

What is the RGB value of #5f7d21?

rgb(95, 125, 33) — 95 red, 125 green and 33 blue out of 255, or 37.3% / 49% / 12.9% by channel.

Is #5f7d21 a light or a dark color?

It is a dark color. Relative luminance is 0.1721 and perceived brightness is 43%, so white text on it reaches 4.73:1.

Should I use black or white text on #5f7d21?

White. It scores 4.73:1 against #5f7d21, versus 4.44:1 for black — AA at any size.

What is the complementary color of #5f7d21?

#3F217D sits directly opposite on the wheel. Softer options are the split-complements #21317D and #6D217D, which give the same contrast with far less vibration.

What colors go well with #5f7d21?

For interface work: #F8FAF4 as the surface, #DEEDC0 for borders, #819B4B for secondary text, #251E80 as an accent and #4D651B for hover and pressed states. For a palette, the analogous pair #7D6D21 and #317D21 stays calm, while #3F217D is the loudest partner.

What is #5f7d21 in CMYK for printing?

cmyk(24%, 0%, 74%, 51%). This is a screen-to-ink approximation — ask your printer for a proof before committing to a run.

Is #5f7d21 warm or cool?

Warm — it scores 41 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #7D7921; nudged cooler, #3D7F1F.

Work with #5f7d21 in the Color Lab