Skip to content

#afba38

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

RGB
175, 186, 56
HSL
65°, 54%, 48%
CMYK
6, 0, 70, 27
Luminance
0.4452

At a glance

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

Hex
#afba38
Hue
65°
yellow
Saturation
54%
vivid
Lightness
48%
balanced
Brightness
73%
HSV value
Perceived
68%
weighted brightness
Luminance
0.4452
WCAG relative
Temperature
Warm
29/100 cool
Color family
Yellow
Tone
Vivid
Best ink
Black
9.90:1
Closest name
Dark Khaki
ΔE2000 7.9
Where it sits
Hue65° of 360°
Saturation54%
Lightness48%
Temperature
Warm ← → Cool29% 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#afba38
RGBrgb(175, 186, 56)
HSLhsl(65, 54%, 48%)
CMYKcmyk(6%, 0%, 70%, 27%)
LABlab(72.6 -20.2 61.2)
LCHlch(72.6 64.4 108.3)
OKLCHoklch(0.757 0.150 114.2)
Decimal11516472
Display P3color(display-p3 0.686 0.729 0.220)

Copy-ready code

/* CSS */
color: #afba38;
background-color: #afba38;
/* Tailwind (arbitrary) */
class="text-[#afba38] bg-[#afba38]"
/* SCSS */
$brand: #afba38;
/* SwiftUI */
Color(red: 0.686, green: 0.729, blue: 0.220)
/* Android */
Color.parseColor("#afba38")
/* Flutter */
Color(0xFFAFBA38)
/* Python / OpenCV (BGR) */
(56, 186, 175)

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

Accessibility — WCAG contrast

Aa
#afba38 on white: 2.12:1
AA ✗ fail · AA-large · AAA
Aa
#afba38 on black: 9.90:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #C7B122
deuteranopia · #C7B342
tritanopia · #BAAFA0

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #afba38 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.

#FAFBF4
#F5F6E9
#EBEECE
#E0E5A9
#D0D87E
#C1CB53
#afba38
#939D2F
#767D26
#565B1F
#363913
Base = 600Lightest = 50 · #FAFBF4Darkest = 950 · #363913
:root {
  --brand-50: #FAFBF4;
  --brand-100: #F5F6E9;
  --brand-200: #EBEECE;
  --brand-300: #E0E5A9;
  --brand-400: #D0D87E;
  --brand-500: #C1CB53;
  --brand-600: #afba38;
  --brand-700: #939D2F;
  --brand-800: #767D26;
  --brand-900: #565B1F;
  --brand-950: #363913;
  --brand: #afba38;
  --brand-ink: #000000;
}

Colors that work with #afba38

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#FAFAF4
Tinted page background
Border#E8ECC0
Hairlines and dividers
Muted text#949B4B
Captions on the surface
Accent#334ABF
Second voice, not a rival
Dark variant#5C621E
Hover, pressed, headers
Light variant#F8F9EB
Selected rows, tints
Dark surface#232414
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 #afba38

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

Works well for
  • Text and icons on dark surfaces
  • Primary buttons and calls to action
  • Focus rings, active and selected states
  • Brand accents, badges and data highlights
Use with care
  • Text of any size on white — fails WCAG AA
  • Full-page backgrounds — tiring over long sessions
  • 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#4338BA
Analogous left#BA8438
Analogous right#6EBA38
Split-complement 1#386EBA
Split-complement 2#8438BA
Triadic 1#38AFBA
Triadic 2#BA38AF
Tetradic#38BA84

RGB percentages

Red68.6%
Green72.9%
Blue22.0%

CMYK percentages

Cyan5.9%
Magenta0.0%
Yellow69.9%
Key (black)27.1%

Color previews

#afba38 text on a black background

contrast 9.90:1

Card sample

#afba38 text on a white background

contrast 2.12:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(175, 186, 56, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(175, 186, 56, 0.45);
Border & gradient
Gradient panel
border: 3px solid #afba38;
background: linear-gradient(135deg, #afba38, #58BA38);

Monochromatic scale

Palettes built from #afba38

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.

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

#afba38, answered

What color is #afba38?

#afba38 is a balanced vivid yellow, closest to Dark Khaki (ΔE2000 7.9). It sits at 65° on the hue wheel with 54% saturation and 48% lightness, which reads as warm.

What is the RGB value of #afba38?

rgb(175, 186, 56) — 175 red, 186 green and 56 blue out of 255, or 68.6% / 72.9% / 22% by channel.

Is #afba38 a light or a dark color?

It is a mid-tone. Relative luminance is 0.4452 and perceived brightness is 68%, so black text on it reaches 9.90:1.

Should I use black or white text on #afba38?

Black. It scores 9.90:1 against #afba38, versus 2.12:1 for white — AAA at any size.

What is the complementary color of #afba38?

#4338BA sits directly opposite on the wheel. Softer options are the split-complements #386EBA and #8438BA, which give the same contrast with far less vibration.

What colors go well with #afba38?

For interface work: #FAFAF4 as the surface, #E8ECC0 for borders, #949B4B for secondary text, #334ABF as an accent and #5C621E for hover and pressed states. For a palette, the analogous pair #BA8438 and #6EBA38 stays calm, while #4338BA is the loudest partner.

What is #afba38 in CMYK for printing?

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

Is #afba38 warm or cool?

Warm — it scores 29 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #BA9638; nudged cooler, #80BD36.

Work with #afba38 in the Color Lab