Skip to content

#f2df4c

a balanced, electric yellow · warm · closest name: Gold

RGB
242, 223, 76
HSL
53°, 87%, 62%
CMYK
0, 8, 69, 5
Luminance
0.7217

At a glance

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

Hex
#f2df4c
Hue
53°
yellow
Saturation
87%
electric
Lightness
62%
balanced
Brightness
95%
HSV value
Perceived
85%
weighted brightness
Luminance
0.7217
WCAG relative
Temperature
Warm
19/100 cool
Color family
Yellow
Tone
Electric
Best ink
Black
15.43:1
Closest name
Gold
ΔE2000 6.1
Where it sits
Hue53° of 360°
Saturation87%
Lightness62%
Temperature
Warm ← → Cool19% 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#f2df4c
RGBrgb(242, 223, 76)
HSLhsl(53, 87%, 62%)
CMYKcmyk(0%, 8%, 69%, 5%)
LABlab(88.0 -9.6 70.9)
LCHlch(88.0 71.5 97.7)
OKLCHoklch(0.894 0.162 101.8)
Decimal15916876
Display P3color(display-p3 0.949 0.875 0.298)

Copy-ready code

/* CSS */
color: #f2df4c;
background-color: #f2df4c;
/* Tailwind (arbitrary) */
class="text-[#f2df4c] bg-[#f2df4c]"
/* SCSS */
$brand: #f2df4c;
/* SwiftUI */
Color(red: 0.949, green: 0.875, blue: 0.298)
/* Android */
Color.parseColor("#f2df4c")
/* Flutter */
Color(0xFFF2DF4C)
/* Python / OpenCV (BGR) */
(76, 223, 242)

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

Accessibility — WCAG contrast

Aa
#f2df4c on white: 1.36:1
AA ✗ fail · AA-large · AAA
Aa
#f2df4c on black: 15.43:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #F3D836
deuteranopia · #F9E055
tritanopia · #FFD0C1

Color scale — 50 to 950

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

#FDFBF2
#FAF8E5
#F7F1C4
#F7EC96
#f2df4c
#F0DA2E
#E4CC11
#BEAA0E
#98880B
#6E630C
#453E08
Base = 400Lightest = 50 · #FDFBF2Darkest = 950 · #453E08
:root {
  --brand-50: #FDFBF2;
  --brand-100: #FAF8E5;
  --brand-200: #F7F1C4;
  --brand-300: #F7EC96;
  --brand-400: #f2df4c;
  --brand-500: #F0DA2E;
  --brand-600: #E4CC11;
  --brand-700: #BEAA0E;
  --brand-800: #98880B;
  --brand-900: #6E630C;
  --brand-950: #453E08;
  --brand: #f2df4c;
  --brand-ink: #000000;
}

Colors that work with #f2df4c

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#EDE7C0
Hairlines and dividers
Muted text#9B924B
Captions on the surface
Accent#4888F6
Second voice, not a rival
Dark variant#776A09
Hover, pressed, headers
Light variant#FDFBE7
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 #f2df4c

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#4C5FF2
Analogous left#F28C4C
Analogous right#B2F24C
Split-complement 1#4CB2F2
Split-complement 2#8C4CF2
Triadic 1#4CF2DF
Triadic 2#DF4CF2
Tetradic#4CF28C

RGB percentages

Red94.9%
Green87.5%
Blue29.8%

CMYK percentages

Cyan0.0%
Magenta7.9%
Yellow68.6%
Key (black)5.1%

Color previews

#f2df4c text on a black background

contrast 15.43:1

Card sample

#f2df4c text on a white background

contrast 1.36:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(242, 223, 76, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(242, 223, 76, 0.45);
Border & gradient
Gradient panel
border: 3px solid #f2df4c;
background: linear-gradient(135deg, #f2df4c, #97F24C);

Monochromatic scale

Palettes built from #f2df4c

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.

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

#f2df4c, answered

What color is #f2df4c?

#f2df4c is a balanced electric yellow, closest to Gold (ΔE2000 6.1). It sits at 53° on the hue wheel with 87% saturation and 62% lightness, which reads as warm.

What is the RGB value of #f2df4c?

rgb(242, 223, 76) — 242 red, 223 green and 76 blue out of 255, or 94.9% / 87.5% / 29.8% by channel.

Is #f2df4c a light or a dark color?

It is a light color. Relative luminance is 0.7217 and perceived brightness is 85%, so black text on it reaches 15.43:1.

Should I use black or white text on #f2df4c?

Black. It scores 15.43:1 against #f2df4c, versus 1.36:1 for white — AAA at any size.

What is the complementary color of #f2df4c?

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

What colors go well with #f2df4c?

For interface work: #FAFAF4 as the surface, #EDE7C0 for borders, #9B924B for secondary text, #4888F6 as an accent and #776A09 for hover and pressed states. For a palette, the analogous pair #F28C4C and #B2F24C stays calm, while #4C5FF2 is the loudest partner.

What is #f2df4c in CMYK for printing?

cmyk(0%, 8%, 69%, 5%). 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 #f2df4c warm or cool?

Warm — it scores 19 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #F2B24C; nudged cooler, #C9F44A.

Work with #f2df4c in the Color Lab