Skip to content

#afb30c

a dark, electric yellow · warm · closest name: Dark Khaki

RGB
175, 179, 12
HSL
61°, 87%, 38%
CMYK
2, 0, 93, 30
Luminance
0.4138

At a glance

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

Hex
#afb30c
Hue
61°
yellow
Saturation
87%
electric
Lightness
38%
dark
Brightness
70%
HSV value
Perceived
66%
weighted brightness
Luminance
0.4138
WCAG relative
Temperature
Warm
26/100 cool
Color family
Yellow
Tone
Electric
Best ink
Black
9.28:1
Closest name
Dark Khaki
ΔE2000 9.5
Where it sits
Hue61° of 360°
Saturation87%
Lightness38%
Temperature
Warm ← → Cool26% 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#afb30c
RGBrgb(175, 179, 12)
HSLhsl(61, 87%, 38%)
CMYKcmyk(2%, 0%, 93%, 30%)
LABlab(70.4 -18.1 70.7)
LCHlch(70.4 73.0 104.4)
OKLCHoklch(0.739 0.161 111.4)
Decimal11514636
Display P3color(display-p3 0.686 0.702 0.047)

Copy-ready code

/* CSS */
color: #afb30c;
background-color: #afb30c;
/* Tailwind (arbitrary) */
class="text-[#afb30c] bg-[#afb30c]"
/* SCSS */
$brand: #afb30c;
/* SwiftUI */
Color(red: 0.686, green: 0.702, blue: 0.047)
/* Android */
Color.parseColor("#afb30c")
/* Flutter */
Color(0xFFAFB30C)
/* Python / OpenCV (BGR) */
(12, 179, 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 #afb30c · 9.28:1
Use #000000AAA at every size.
Aa
White text · 2.26:1
AA fail · AA large fail · AAA fail
Aa
Black text · 9.28:1 · recommended
AA pass · AA large pass · AAA pass
Reading the other direction: #afb30c as text scores 2.26:1 on white and 9.28:1 on black.

Accessibility — WCAG contrast

Aa
#afb30c on white: 2.26:1
AA ✗ fail · AA-large · AAA
Aa
#afb30c on black: 9.28:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #C2AA00
deuteranopia · #C3AE24
tritanopia · #BCA798

Color scale — 50 to 950

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

#FCFDF2
#FAFAE5
#F6F8C4
#F6F896
#F1F461
#ECF12D
#E0E50F
#afb30c
#96990A
#6C6E0C
#444507
Base = 700Lightest = 50 · #FCFDF2Darkest = 950 · #444507
:root {
  --brand-50: #FCFDF2;
  --brand-100: #FAFAE5;
  --brand-200: #F6F8C4;
  --brand-300: #F6F896;
  --brand-400: #F1F461;
  --brand-500: #ECF12D;
  --brand-600: #E0E50F;
  --brand-700: #afb30c;
  --brand-800: #96990A;
  --brand-900: #6C6E0C;
  --brand-950: #444507;
  --brand: #afb30c;
  --brand-ink: #000000;
}

Colors that work with #afb30c

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#ECEDC0
Hairlines and dividers
Muted text#999B4B
Captions on the surface
Accent#0830B7
Second voice, not a rival
Dark variant#757708
Hover, pressed, headers
Light variant#FDFDE7
Selected rows, tints
Dark surface#242414
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 #afb30c

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
  • Headers, footers and dark-mode surfaces
  • 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
  • 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#100CB3
Analogous left#B3640C
Analogous right#5CB30C
Split-complement 1#0C5CB3
Split-complement 2#640CB3
Triadic 1#0CAFB3
Triadic 2#B30CAF
Tetradic#0CB364

RGB percentages

Red68.6%
Green70.2%
Blue4.7%

CMYK percentages

Cyan2.2%
Magenta0.0%
Yellow93.3%
Key (black)29.8%

Color previews

#afb30c text on a black background

contrast 9.28:1

Card sample

#afb30c text on a white background

contrast 2.26:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(175, 179, 12, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(175, 179, 12, 0.45);
Border & gradient
Gradient panel
border: 3px solid #afb30c;
background: linear-gradient(135deg, #afb30c, #40B30C);

Monochromatic scale

Palettes built from #afb30c

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.

#afb30c 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

Sits outside most CMYK gamuts — expect a duller press result, or specify a spot ink.

#afb30c, answered

What color is #afb30c?

#afb30c is a dark electric yellow, closest to Dark Khaki (ΔE2000 9.5). It sits at 61° on the hue wheel with 87% saturation and 38% lightness, which reads as warm.

What is the RGB value of #afb30c?

rgb(175, 179, 12) — 175 red, 179 green and 12 blue out of 255, or 68.6% / 70.2% / 4.7% by channel.

Is #afb30c a light or a dark color?

It is a mid-tone. Relative luminance is 0.4138 and perceived brightness is 66%, so black text on it reaches 9.28:1.

Should I use black or white text on #afb30c?

Black. It scores 9.28:1 against #afb30c, versus 2.26:1 for white — AAA at any size.

What is the complementary color of #afb30c?

#100CB3 sits directly opposite on the wheel. Softer options are the split-complements #0C5CB3 and #640CB3, which give the same contrast with far less vibration.

What colors go well with #afb30c?

For interface work: #FAFAF4 as the surface, #ECEDC0 for borders, #999B4B for secondary text, #0830B7 as an accent and #757708 for hover and pressed states. For a palette, the analogous pair #B3640C and #5CB30C stays calm, while #100CB3 is the loudest partner.

What is #afb30c in CMYK for printing?

cmyk(2%, 0%, 93%, 30%). This is a screen-to-ink approximation — a color this saturated sits outside most CMYK gamuts and will print duller than it looks here.

Is #afb30c warm or cool?

Warm — it scores 26 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #B37D0C; nudged cooler, #72B50A.

Work with #afb30c in the Color Lab