Skip to content

#f02cd4

a balanced, electric magenta / pink · warm · closest name: magenta

RGB
240, 44, 212
HSL
309°, 87%, 56%
CMYK
0, 82, 12, 6
Luminance
0.2508

Every format

HEX#f02cd4
RGBrgb(240, 44, 212)
HSLhsl(309, 87%, 56%)
CMYKcmyk(0%, 82%, 12%, 6%)
LABlab(57.2 84.8 -41.9)
LCHlch(57.2 94.6 333.7)
OKLCHoklch(0.667 0.273 335.2)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#f02cd4 on white: 3.49:1
AA ✗ fail · AA-large · AAA
Aa
#f02cd4 on black: 6.02:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red94.1%
Green17.3%
Blue83.1%

CMYK percentages

Cyan0.0%
Magenta81.7%
Yellow11.7%
Key (black)5.9%

Color previews

#f02cd4 text on a black background

contrast 6.02:1

Card sample

#f02cd4 text on a white background

contrast 3.49:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #f02cd4

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #f02cd4 in the Color Lab