Skip to content

#f2f28b

a light, electric yellow · warm · closest name: Khaki

RGB
242, 242, 139
HSL
60°, 80%, 75%
CMYK
0, 0, 43, 5
Luminance
0.8425

At a glance

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

Hex
#f2f28b
Hue
60°
yellow
Saturation
80%
electric
Lightness
75%
light
Brightness
95%
HSV value
Perceived
91%
weighted brightness
Luminance
0.8425
WCAG relative
Temperature
Warm
25/100 cool
Color family
Yellow
Tone
Electric
Best ink
Black
17.85:1
Closest name
Khaki
ΔE2000 3.7
Where it sits
Hue60° of 360°
Saturation80%
Lightness75%
Temperature
Warm ← → Cool25% 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#f2f28b
RGBrgb(242, 242, 139)
HSLhsl(60, 80%, 75%)
CMYKcmyk(0%, 0%, 43%, 5%)
LABlab(93.6 -14.3 49.5)
LCHlch(93.6 51.5 106.1)
OKLCHoklch(0.940 0.126 108.6)
Decimal15921803
Display P3color(display-p3 0.949 0.949 0.545)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#f2f28b on white: 1.18:1
AA ✗ fail · AA-large · AAA
Aa
#f2f28b on black: 17.85:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #FFEA83
deuteranopia · #FFEE90
tritanopia · #FFE6D9

Color scale — 50 to 950

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

#FCFCF3
#F9F9E6
#F5F5C7
#f2f28b
#EEEE68
#E8E835
#DCDC19
#B7B715
#939310
#6A6A10
#42420A
Base = 300Lightest = 50 · #FCFCF3Darkest = 950 · #42420A
:root {
  --brand-50: #FCFCF3;
  --brand-100: #F9F9E6;
  --brand-200: #F5F5C7;
  --brand-300: #f2f28b;
  --brand-400: #EEEE68;
  --brand-500: #E8E835;
  --brand-600: #DCDC19;
  --brand-700: #B7B715;
  --brand-800: #939310;
  --brand-900: #6A6A10;
  --brand-950: #42420A;
  --brand: #f2f28b;
  --brand-ink: #000000;
}

Colors that work with #f2f28b

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#EDEDC0
Hairlines and dividers
Muted text#9B9B4B
Captions on the surface
Accent#103BBC
Second voice, not a rival
Dark variant#73730D
Hover, pressed, headers
Light variant#FCFCE8
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 #f2f28b

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
  • Card and section backgrounds
  • 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
  • White 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#8B8BF2
Analogous left#F2BE8B
Analogous right#BEF28B
Split-complement 1#8BBEF2
Split-complement 2#BE8BF2
Triadic 1#8BF2F2
Triadic 2#F28BF2
Tetradic#8BF2BE

RGB percentages

Red94.9%
Green94.9%
Blue54.5%

CMYK percentages

Cyan0.0%
Magenta0.0%
Yellow42.6%
Key (black)5.1%

Color previews

#f2f28b text on a black background

contrast 17.85:1

Card sample

#f2f28b text on a white background

contrast 1.18:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #f2f28b

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.

#f2f28b 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
SurfacesBadgesHighlightsEmpty states
Print note

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

#f2f28b, answered

What color is #f2f28b?

#f2f28b is a light electric yellow, closest to Khaki (ΔE2000 3.7). It sits at 60° on the hue wheel with 80% saturation and 75% lightness, which reads as warm.

What is the RGB value of #f2f28b?

rgb(242, 242, 139) — 242 red, 242 green and 139 blue out of 255, or 94.9% / 94.9% / 54.5% by channel.

Is #f2f28b a light or a dark color?

It is a light color. Relative luminance is 0.8425 and perceived brightness is 91%, so black text on it reaches 17.85:1.

Should I use black or white text on #f2f28b?

Black. It scores 17.85:1 against #f2f28b, versus 1.18:1 for white — AAA at any size.

What is the complementary color of #f2f28b?

#8B8BF2 sits directly opposite on the wheel. Softer options are the split-complements #8BBEF2 and #BE8BF2, which give the same contrast with far less vibration.

What colors go well with #f2f28b?

For interface work: #FAFAF4 as the surface, #EDEDC0 for borders, #9B9B4B for secondary text, #103BBC as an accent and #73730D for hover and pressed states. For a palette, the analogous pair #F2BE8B and #BEF28B stays calm, while #8B8BF2 is the loudest partner.

What is #f2f28b in CMYK for printing?

cmyk(0%, 0%, 43%, 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 #f2f28b warm or cool?

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

Work with #f2f28b in the Color Lab