Skip to content

#f0cf8c

a light, electric yellow · warm · closest name: Navajo White

RGB
240, 207, 140
HSL
40°, 77%, 75%
CMYK
0, 14, 42, 6
Luminance
0.6504

At a glance

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

Hex
#f0cf8c
Hue
40°
yellow
Saturation
77%
electric
Lightness
75%
light
Brightness
94%
HSV value
Perceived
83%
weighted brightness
Luminance
0.6504
WCAG relative
Temperature
Warm
8/100 cool
Color family
Yellow
Tone
Electric
Best ink
Black
14.01:1
Closest name
Navajo White
ΔE2000 5.6
Where it sits
Hue40° of 360°
Saturation77%
Lightness75%
Temperature
Warm ← → Cool8% 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#f0cf8c
RGBrgb(240, 207, 140)
HSLhsl(40, 77%, 75%)
CMYKcmyk(0%, 14%, 42%, 6%)
LABlab(84.5 2.7 37.5)
LCHlch(84.5 37.6 85.9)
OKLCHoklch(0.868 0.093 84.4)
Decimal15781772
Display P3color(display-p3 0.941 0.812 0.549)

Copy-ready code

/* CSS */
color: #f0cf8c;
background-color: #f0cf8c;
/* Tailwind (arbitrary) */
class="text-[#f0cf8c] bg-[#f0cf8c]"
/* SCSS */
$brand: #f0cf8c;
/* SwiftUI */
Color(red: 0.941, green: 0.812, blue: 0.549)
/* Android */
Color.parseColor("#f0cf8c")
/* Flutter */
Color(0xFFF0CF8C)
/* Python / OpenCV (BGR) */
(140, 207, 240)

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

Accessibility — WCAG contrast

Aa
#f0cf8c on white: 1.50:1
AA ✗ fail · AA-large · AAA
Aa
#f0cf8c on black: 14.01:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #DFCE87
deuteranopia · #E7D78E
tritanopia · #FFC4BE

Color scale — 50 to 950

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

#FCF9F3
#F9F3E7
#F4E5C7
#f0cf8c
#ECC16A
#E5AC39
#D99A1C
#B48118
#906713
#684C12
#412F0B
Base = 300Lightest = 50 · #FCF9F3Darkest = 950 · #412F0B
:root {
  --brand-50: #FCF9F3;
  --brand-100: #F9F3E7;
  --brand-200: #F4E5C7;
  --brand-300: #f0cf8c;
  --brand-400: #ECC16A;
  --brand-500: #E5AC39;
  --brand-600: #D99A1C;
  --brand-700: #B48118;
  --brand-800: #906713;
  --brand-900: #684C12;
  --brand-950: #412F0B;
  --brand: #f0cf8c;
  --brand-ink: #000000;
}

Colors that work with #f0cf8c

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#FAF8F4
Tinted page background
Border#EDDEC0
Hairlines and dividers
Muted text#9B804B
Captions on the surface
Accent#1372B9
Second voice, not a rival
Dark variant#71500F
Hover, pressed, headers
Light variant#FCF6E8
Selected rows, tints
Dark surface#241F14
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 #f0cf8c

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#8CADF0
Analogous left#F09D8C
Analogous right#DFF08C
Split-complement 1#8CDFF0
Split-complement 2#9D8CF0
Triadic 1#8CF0CF
Triadic 2#CF8CF0
Tetradic#8CF09D

RGB percentages

Red94.1%
Green81.2%
Blue54.9%

CMYK percentages

Cyan0.0%
Magenta13.7%
Yellow41.7%
Key (black)5.9%

Color previews

#f0cf8c text on a black background

contrast 14.01:1

Card sample

#f0cf8c text on a white background

contrast 1.50:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(240, 207, 140, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(240, 207, 140, 0.45);
Border & gradient
Gradient panel
border: 3px solid #f0cf8c;
background: linear-gradient(135deg, #f0cf8c, #CEF08C);

Monochromatic scale

Palettes built from #f0cf8c

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.

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

#f0cf8c, answered

What color is #f0cf8c?

#f0cf8c is a light electric yellow, closest to Navajo White (ΔE2000 5.6). It sits at 40° on the hue wheel with 77% saturation and 75% lightness, which reads as warm.

What is the RGB value of #f0cf8c?

rgb(240, 207, 140) — 240 red, 207 green and 140 blue out of 255, or 94.1% / 81.2% / 54.9% by channel.

Is #f0cf8c a light or a dark color?

It is a light color. Relative luminance is 0.6504 and perceived brightness is 83%, so black text on it reaches 14.01:1.

Should I use black or white text on #f0cf8c?

Black. It scores 14.01:1 against #f0cf8c, versus 1.50:1 for white — AAA at any size.

What is the complementary color of #f0cf8c?

#8CADF0 sits directly opposite on the wheel. Softer options are the split-complements #8CDFF0 and #9D8CF0, which give the same contrast with far less vibration.

What colors go well with #f0cf8c?

For interface work: #FAF8F4 as the surface, #EDDEC0 for borders, #9B804B for secondary text, #1372B9 as an accent and #71500F for hover and pressed states. For a palette, the analogous pair #F09D8C and #DFF08C stays calm, while #8CADF0 is the loudest partner.

What is #f0cf8c in CMYK for printing?

cmyk(0%, 14%, 42%, 6%). 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 #f0cf8c warm or cool?

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

Work with #f0cf8c in the Color Lab