Skip to content

#a2af4f

a balanced, soft yellow · warm · closest name: Dark Khaki

RGB
162, 175, 79
HSL
68°, 38%, 50%
CMYK
7, 0, 55, 31
Luminance
0.3891

At a glance

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

Hex
#a2af4f
Hue
68°
yellow
Saturation
38%
soft
Lightness
50%
balanced
Brightness
69%
HSV value
Perceived
64%
weighted brightness
Luminance
0.3891
WCAG relative
Temperature
Warm
32/100 cool
Color family
Yellow
Tone
Soft
Best ink
Black
8.78:1
Closest name
Dark Khaki
ΔE2000 6.6
Where it sits
Hue68° of 360°
Saturation38%
Lightness50%
Temperature
Warm ← → Cool32% 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#a2af4f
RGBrgb(162, 175, 79)
HSLhsl(68, 38%, 50%)
CMYKcmyk(7%, 0%, 55%, 31%)
LABlab(68.7 -18.5 46.9)
LCHlch(68.7 50.4 111.5)
OKLCHoklch(0.724 0.122 116.0)
Decimal10661711
Display P3color(display-p3 0.635 0.686 0.310)

Copy-ready code

/* CSS */
color: #a2af4f;
background-color: #a2af4f;
/* Tailwind (arbitrary) */
class="text-[#a2af4f] bg-[#a2af4f]"
/* SCSS */
$brand: #a2af4f;
/* SwiftUI */
Color(red: 0.635, green: 0.686, blue: 0.310)
/* Android */
Color.parseColor("#a2af4f")
/* Flutter */
Color(0xFFA2AF4F)
/* Python / OpenCV (BGR) */
(79, 175, 162)

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

Accessibility — WCAG contrast

Aa
#a2af4f on white: 2.39:1
AA ✗ fail · AA-large · AAA
Aa
#a2af4f on black: 8.78:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #BAA745
deuteranopia · #B9A855
tritanopia · #ABA69A

Color scale — 50 to 950

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

#F9FAF5
#F3F4EB
#E6E9D3
#D6DCB2
#C2CB8B
#AEB964
#a2af4f
#828D3F
#687033
#4D5228
#303419
Base = 600Lightest = 50 · #F9FAF5Darkest = 950 · #303419
:root {
  --brand-50: #F9FAF5;
  --brand-100: #F3F4EB;
  --brand-200: #E6E9D3;
  --brand-300: #D6DCB2;
  --brand-400: #C2CB8B;
  --brand-500: #AEB964;
  --brand-600: #a2af4f;
  --brand-700: #828D3F;
  --brand-800: #687033;
  --brand-900: #4D5228;
  --brand-950: #303419;
  --brand: #a2af4f;
  --brand-ink: #000000;
}

Colors that work with #a2af4f

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#E1E6C7
Hairlines and dividers
Muted text#909B4B
Captions on the surface
Accent#4A56B4
Second voice, not a rival
Dark variant#515828
Hover, pressed, headers
Light variant#F6F7ED
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 #a2af4f

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

Works well for
  • Text and icons on dark surfaces
  • Charts, tags and secondary surfaces
  • Brand accents, badges and data highlights
Use with care
  • Text of any size on white — fails WCAG AA
  • 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#5C4FAF
Analogous left#AF8C4F
Analogous right#72AF4F
Split-complement 1#4F72AF
Split-complement 2#8C4FAF
Triadic 1#4FA2AF
Triadic 2#AF4FA2
Tetradic#4FAF8C

RGB percentages

Red63.5%
Green68.6%
Blue31.0%

CMYK percentages

Cyan7.4%
Magenta0.0%
Yellow54.9%
Key (black)31.4%

Color previews

#a2af4f text on a black background

contrast 8.78:1

Card sample

#a2af4f text on a white background

contrast 2.39:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(162, 175, 79, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(162, 175, 79, 0.45);
Border & gradient
Gradient panel
border: 3px solid #a2af4f;
background: linear-gradient(135deg, #a2af4f, #62AF4F);

Monochromatic scale

Palettes built from #a2af4f

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.

#a2af4f 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.

#a2af4f, answered

What color is #a2af4f?

#a2af4f is a balanced soft yellow, closest to Dark Khaki (ΔE2000 6.6). It sits at 68° on the hue wheel with 38% saturation and 50% lightness, which reads as warm.

What is the RGB value of #a2af4f?

rgb(162, 175, 79) — 162 red, 175 green and 79 blue out of 255, or 63.5% / 68.6% / 31% by channel.

Is #a2af4f a light or a dark color?

It is a mid-tone. Relative luminance is 0.3891 and perceived brightness is 64%, so black text on it reaches 8.78:1.

Should I use black or white text on #a2af4f?

Black. It scores 8.78:1 against #a2af4f, versus 2.39:1 for white — AAA at any size.

What is the complementary color of #a2af4f?

#5C4FAF sits directly opposite on the wheel. Softer options are the split-complements #4F72AF and #8C4FAF, which give the same contrast with far less vibration.

What colors go well with #a2af4f?

For interface work: #F9FAF4 as the surface, #E1E6C7 for borders, #909B4B for secondary text, #4A56B4 as an accent and #515828 for hover and pressed states. For a palette, the analogous pair #AF8C4F and #72AF4F stays calm, while #5C4FAF is the loudest partner.

What is #a2af4f in CMYK for printing?

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

Is #a2af4f warm or cool?

Warm — it scores 32 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #AF994F; nudged cooler, #7FB24C.

Work with #a2af4f in the Color Lab