Skip to content

#f0cb4f

a balanced, electric yellow · cool · closest name: khaki

RGB
240, 203, 79
HSL
46°, 84%, 63%
CMYK
0, 15, 67, 6
Luminance
0.6180

Every format

HEX#f0cb4f
RGBrgb(240, 203, 79)
HSLhsl(46, 84%, 63%)
CMYKcmyk(0%, 15%, 67%, 6%)
LABlab(82.8 -0.1 64.3)
LCHlch(82.8 64.3 90.1)
OKLCHoklch(0.852 0.145 92.3)

Copy-ready code

/* CSS */
color: #f0cb4f;
background-color: #f0cb4f;
/* Tailwind (arbitrary) */
class="text-[#f0cb4f] bg-[#f0cb4f]"
/* SCSS */
$brand: #f0cb4f;
/* SwiftUI */
Color(red: 0.941, green: 0.796, blue: 0.310)
/* Android */
Color.parseColor("#f0cb4f")

Accessibility — WCAG contrast

Aa
#f0cb4f on white: 1.57:1
AA ✗ fail · AA-large · AAA
Aa
#f0cb4f on black: 13.36:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red94.1%
Green79.6%
Blue31.0%

CMYK percentages

Cyan0.0%
Magenta15.4%
Yellow67.1%
Key (black)5.9%

Color previews

#f0cb4f text on a black background

contrast 13.36:1

Card sample

#f0cb4f text on a white background

contrast 1.57:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #f0cb4f

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #f0cb4f in the Color Lab