Skip to content

#bbaf21

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

RGB
187, 175, 33
HSL
55°, 70%, 43%
CMYK
0, 6, 82, 27
Luminance
0.4133

At a glance

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

Hex
#bbaf21
Hue
55°
yellow
Saturation
70%
vivid
Lightness
43%
dark
Brightness
73%
HSV value
Perceived
66%
weighted brightness
Luminance
0.4133
WCAG relative
Temperature
Warm
21/100 cool
Color family
Yellow
Tone
Vivid
Best ink
Black
9.27:1
Closest name
Dark Khaki
ΔE2000 8.6
Where it sits
Hue55° of 360°
Saturation70%
Lightness43%
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#bbaf21
RGBrgb(187, 175, 33)
HSLhsl(55, 70%, 43%)
CMYKcmyk(0%, 6%, 82%, 27%)
LABlab(70.4 -10.4 66.9)
LCHlch(70.4 67.7 98.8)
OKLCHoklch(0.741 0.149 104.2)
Decimal12300065
Display P3color(display-p3 0.733 0.686 0.129)

Copy-ready code

/* CSS */
color: #bbaf21;
background-color: #bbaf21;
/* Tailwind (arbitrary) */
class="text-[#bbaf21] bg-[#bbaf21]"
/* SCSS */
$brand: #bbaf21;
/* SwiftUI */
Color(red: 0.733, green: 0.686, blue: 0.129)
/* Android */
Color.parseColor("#bbaf21")
/* Flutter */
Color(0xFFBBAF21)
/* Python / OpenCV (BGR) */
(33, 175, 187)

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

Accessibility — WCAG contrast

Aa
#bbaf21 on white: 2.27:1
AA ✗ fail · AA-large · AAA
Aa
#bbaf21 on black: 9.27:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #BFA900
deuteranopia · #C3AF2E
tritanopia · #CAA296

Color scale — 50 to 950

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

#FCFBF3
#F8F7E7
#F2EFC9
#EEE8A0
#E6DD70
#DDD140
#D0C325
#bbaf21
#8B8218
#655E16
#3F3B0E
Base = 700Lightest = 50 · #FCFBF3Darkest = 950 · #3F3B0E
:root {
  --brand-50: #FCFBF3;
  --brand-100: #F8F7E7;
  --brand-200: #F2EFC9;
  --brand-300: #EEE8A0;
  --brand-400: #E6DD70;
  --brand-500: #DDD140;
  --brand-600: #D0C325;
  --brand-700: #bbaf21;
  --brand-800: #8B8218;
  --brand-900: #655E16;
  --brand-950: #3F3B0E;
  --brand: #bbaf21;
  --brand-ink: #000000;
}

Colors that work with #bbaf21

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#1D52BF
Second voice, not a rival
Dark variant#6C6513
Hover, pressed, headers
Light variant#FBFAE9
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 #bbaf21

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#212DBB
Analogous left#BB6221
Analogous right#7ABB21
Split-complement 1#217ABB
Split-complement 2#6221BB
Triadic 1#21BBAF
Triadic 2#AF21BB
Tetradic#21BB62

RGB percentages

Red73.3%
Green68.6%
Blue12.9%

CMYK percentages

Cyan0.0%
Magenta6.4%
Yellow82.4%
Key (black)26.7%

Color previews

#bbaf21 text on a black background

contrast 9.27:1

Card sample

#bbaf21 text on a white background

contrast 2.27:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(187, 175, 33, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(187, 175, 33, 0.45);
Border & gradient
Gradient panel
border: 3px solid #bbaf21;
background: linear-gradient(135deg, #bbaf21, #60BB21);

Monochromatic scale

Palettes built from #bbaf21

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.

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

#bbaf21, answered

What color is #bbaf21?

#bbaf21 is a dark vivid yellow, closest to Dark Khaki (ΔE2000 8.6). It sits at 55° on the hue wheel with 70% saturation and 43% lightness, which reads as warm.

What is the RGB value of #bbaf21?

rgb(187, 175, 33) — 187 red, 175 green and 33 blue out of 255, or 73.3% / 68.6% / 12.9% by channel.

Is #bbaf21 a light or a dark color?

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

Should I use black or white text on #bbaf21?

Black. It scores 9.27:1 against #bbaf21, versus 2.27:1 for white — AAA at any size.

What is the complementary color of #bbaf21?

#212DBB sits directly opposite on the wheel. Softer options are the split-complements #217ABB and #6221BB, which give the same contrast with far less vibration.

What colors go well with #bbaf21?

For interface work: #FAFAF4 as the surface, #EDE9C0 for borders, #9B954B for secondary text, #1D52BF as an accent and #6C6513 for hover and pressed states. For a palette, the analogous pair #BB6221 and #7ABB21 stays calm, while #212DBB is the loudest partner.

What is #bbaf21 in CMYK for printing?

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

Is #bbaf21 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 #BB8121; nudged cooler, #8FBD1F.

Work with #bbaf21 in the Color Lab