Skip to content

#afa310

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

RGB
175, 163, 16
HSL
56°, 83%, 38%
CMYK
0, 7, 91, 31
Luminance
0.3535

At a glance

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

Hex
#afa310
Hue
56°
yellow
Saturation
83%
electric
Lightness
38%
dark
Brightness
69%
HSV value
Perceived
62%
weighted brightness
Luminance
0.3535
WCAG relative
Temperature
Warm
21/100 cool
Color family
Yellow
Tone
Electric
Best ink
Black
8.07:1
Closest name
Dark Khaki
ΔE2000 10.1
Where it sits
Hue56° of 360°
Saturation83%
Lightness38%
Temperature
Warm ← → Cool21% 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#afa310
RGBrgb(175, 163, 16)
HSLhsl(56, 83%, 38%)
CMYKcmyk(0%, 7%, 91%, 31%)
LABlab(66.0 -9.8 66.7)
LCHlch(66.0 67.4 98.4)
OKLCHoklch(0.704 0.146 104.1)
Decimal11510544
Display P3color(display-p3 0.686 0.639 0.063)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#afa310 on white: 2.60:1
AA ✗ fail · AA-large · AAA
Aa
#afa310 on black: 8.07:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #B39D00
deuteranopia · #B7A322
tritanopia · #BD978B

Color scale — 50 to 950

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

#FCFCF2
#FAF8E6
#F6F2C6
#F6EF98
#F1E665
#ECDE31
#E0D115
#afa310
#958B0E
#6C650E
#443F09
Base = 700Lightest = 50 · #FCFCF2Darkest = 950 · #443F09
:root {
  --brand-50: #FCFCF2;
  --brand-100: #FAF8E6;
  --brand-200: #F6F2C6;
  --brand-300: #F6EF98;
  --brand-400: #F1E665;
  --brand-500: #ECDE31;
  --brand-600: #E0D115;
  --brand-700: #afa310;
  --brand-800: #958B0E;
  --brand-900: #6C650E;
  --brand-950: #443F09;
  --brand: #afa310;
  --brand-ink: #000000;
}

Colors that work with #afa310

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#EDE9C0
Hairlines and dividers
Muted text#9B954B
Captions on the surface
Accent#0C42B3
Second voice, not a rival
Dark variant#756D0B
Hover, pressed, headers
Light variant#FDFBE8
Selected rows, tints
Dark surface#242314
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 #afa310

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#101CAF
Analogous left#AF5410
Analogous right#6CAF10
Split-complement 1#106CAF
Split-complement 2#5410AF
Triadic 1#10AFA3
Triadic 2#A310AF
Tetradic#10AF54

RGB percentages

Red68.6%
Green63.9%
Blue6.3%

CMYK percentages

Cyan0.0%
Magenta6.9%
Yellow90.9%
Key (black)31.4%

Color previews

#afa310 text on a black background

contrast 8.07:1

Card sample

#afa310 text on a white background

contrast 2.60:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(175, 163, 16, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(175, 163, 16, 0.45);
Border & gradient
Gradient panel
border: 3px solid #afa310;
background: linear-gradient(135deg, #afa310, #51AF10);

Monochromatic scale

Palettes built from #afa310

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.

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

#afa310, answered

What color is #afa310?

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

What is the RGB value of #afa310?

rgb(175, 163, 16) — 175 red, 163 green and 16 blue out of 255, or 68.6% / 63.9% / 6.3% by channel.

Is #afa310 a light or a dark color?

It is a mid-tone. Relative luminance is 0.3535 and perceived brightness is 62%, so black text on it reaches 8.07:1.

Should I use black or white text on #afa310?

Black. It scores 8.07:1 against #afa310, versus 2.60:1 for white — AAA at any size.

What is the complementary color of #afa310?

#101CAF sits directly opposite on the wheel. Softer options are the split-complements #106CAF and #5410AF, which give the same contrast with far less vibration.

What colors go well with #afa310?

For interface work: #FAFAF4 as the surface, #EDE9C0 for borders, #9B954B for secondary text, #0C42B3 as an accent and #756D0B for hover and pressed states. For a palette, the analogous pair #AF5410 and #6CAF10 stays calm, while #101CAF is the loudest partner.

What is #afa310 in CMYK for printing?

cmyk(0%, 7%, 91%, 31%). 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 #afa310 warm or cool?

Warm — it scores 21 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #AF7410; nudged cooler, #82B10E.

Work with #afa310 in the Color Lab