Skip to content

#7f8f2c

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

RGB
127, 143, 44
HSL
70°, 53%, 37%
CMYK
11, 0, 69, 44
Luminance
0.2434

At a glance

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

Hex
#7f8f2c
Hue
70°
yellow
Saturation
53%
vivid
Lightness
37%
dark
Brightness
56%
HSV value
Perceived
51%
weighted brightness
Luminance
0.2434
WCAG relative
Temperature
Warm
33/100 cool
Color family
Yellow
Tone
Vivid
Best ink
Black
5.87:1
Closest name
Olive Drab
ΔE2000 4.5
Where it sits
Hue70° of 360°
Saturation53%
Lightness37%
Temperature
Warm ← → Cool33% 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#7f8f2c
RGBrgb(127, 143, 44)
HSLhsl(70, 53%, 37%)
CMYKcmyk(11%, 0%, 69%, 44%)
LABlab(56.4 -19.7 48.4)
LCHlch(56.4 52.3 112.1)
OKLCHoklch(0.618 0.124 118.1)
Decimal8359724
Display P3color(display-p3 0.498 0.561 0.173)

Copy-ready code

/* CSS */
color: #7f8f2c;
background-color: #7f8f2c;
/* Tailwind (arbitrary) */
class="text-[#7f8f2c] bg-[#7f8f2c]"
/* SCSS */
$brand: #7f8f2c;
/* SwiftUI */
Color(red: 0.498, green: 0.561, blue: 0.173)
/* Android */
Color.parseColor("#7f8f2c")
/* Flutter */
Color(0xFF7F8F2C)
/* Python / OpenCV (BGR) */
(44, 143, 127)

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#000000 on #7f8f2c · 5.87:1
Use #000000AA at every size, AAA for large text only.
Aa
White text · 3.58:1
AA fail · AA large pass · AAA fail
Aa
Black text · 5.87:1 · recommended
AA pass · AA large pass · AAA fail
Reading the other direction: #7f8f2c as text scores 3.58:1 on white and 5.87:1 on black.

Accessibility — WCAG contrast

Aa
#7f8f2c on white: 3.58:1
AA ✗ fail · AA-large · AAA
Aa
#7f8f2c on black: 5.87:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #99871D
deuteranopia · #978833
tritanopia · #87877B

Color scale — 50 to 950

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

#F9FBF4
#F4F6E9
#E8EDCE
#DBE5A9
#C9D77E
#B7CA53
#A6BB3A
#7f8f2c
#6F7D26
#515B1F
#333914
Base = 700Lightest = 50 · #F9FBF4Darkest = 950 · #333914
:root {
  --brand-50: #F9FBF4;
  --brand-100: #F4F6E9;
  --brand-200: #E8EDCE;
  --brand-300: #DBE5A9;
  --brand-400: #C9D77E;
  --brand-500: #B7CA53;
  --brand-600: #A6BB3A;
  --brand-700: #7f8f2c;
  --brand-800: #6F7D26;
  --brand-900: #515B1F;
  --brand-950: #333914;
  --brand: #7f8f2c;
  --brand-ink: #000000;
}

Colors that work with #7f8f2c

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

Text on it#000000
Black wins here
Surface#F9FAF4
Tinted page background
Border#E5ECC1
Hairlines and dividers
Muted text#8E9B4B
Captions on the surface
Accent#283293
Second voice, not a rival
Dark variant#57611E
Hover, pressed, headers
Light variant#F7F9EC
Selected rows, tints
Dark surface#222414
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 #7f8f2c

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

Works well for
  • Headings from 24px up on white
  • Text and icons on dark surfaces
  • 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
  • Small text on white — under 4.5:1
  • Full-page backgrounds — tiring over long sessions
  • Black text placed on it
  • Thin strokes and 1px borders — they disappear on light UI
  • 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#3C2C8F
Analogous left#8F6E2C
Analogous right#4E8F2C
Split-complement 1#2C4E8F
Split-complement 2#6E2C8F
Triadic 1#2C7F8F
Triadic 2#8F2C7F
Tetradic#2C8F6E

RGB percentages

Red49.8%
Green56.1%
Blue17.3%

CMYK percentages

Cyan11.2%
Magenta0.0%
Yellow69.2%
Key (black)43.9%

Color previews

#7f8f2c text on a black background

contrast 5.87:1

Card sample

#7f8f2c text on a white background

contrast 3.58:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #7f8f2c;
Background color
Panel with #7f8f2c background
background-color: #7f8f2c;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #7f8f2c;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(127, 143, 44, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(127, 143, 44, 0.45);
Border & gradient
Gradient panel
border: 3px solid #7f8f2c;
background: linear-gradient(135deg, #7f8f2c, #3D8F2C);

Monochromatic scale

Palettes built from #7f8f2c

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.

#7f8f2c in the real world

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

Industries
RetailLeisureEnergyWarning systems
Common UI roles
ButtonsLinksFocus statesCharts
Print note

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

#7f8f2c, answered

What color is #7f8f2c?

#7f8f2c is a dark vivid yellow, closest to Olive Drab (ΔE2000 4.5). It sits at 70° on the hue wheel with 53% saturation and 37% lightness, which reads as warm.

What is the RGB value of #7f8f2c?

rgb(127, 143, 44) — 127 red, 143 green and 44 blue out of 255, or 49.8% / 56.1% / 17.3% by channel.

Is #7f8f2c a light or a dark color?

It is a mid-tone. Relative luminance is 0.2434 and perceived brightness is 51%, so black text on it reaches 5.87:1.

Should I use black or white text on #7f8f2c?

Black. It scores 5.87:1 against #7f8f2c, versus 3.58:1 for white — AA at any size.

What is the complementary color of #7f8f2c?

#3C2C8F sits directly opposite on the wheel. Softer options are the split-complements #2C4E8F and #6E2C8F, which give the same contrast with far less vibration.

What colors go well with #7f8f2c?

For interface work: #F9FAF4 as the surface, #E5ECC1 for borders, #8E9B4B for secondary text, #283293 as an accent and #57611E for hover and pressed states. For a palette, the analogous pair #8F6E2C and #4E8F2C stays calm, while #3C2C8F is the loudest partner.

What is #7f8f2c in CMYK for printing?

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

Is #7f8f2c warm or cool?

Warm — it scores 33 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #8F7B2C; nudged cooler, #5B912A.

Work with #7f8f2c in the Color Lab