Skip to content

#f02aff

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

RGB
240, 42, 255
HSL
296°, 100%, 58%
CMYK
6, 84, 0, 0
Luminance
0.2740

Every format

HEX#f02aff
RGBrgb(240, 42, 255)
HSLhsl(296, 100%, 58%)
CMYKcmyk(6%, 84%, 0%, 0%)
LABlab(59.4 91.4 -62.5)
LCHlch(59.4 110.8 325.6)
OKLCHoklch(0.690 0.303 324.8)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#f02aff on white: 3.24:1
AA ✗ fail · AA-large · AAA
Aa
#f02aff on black: 6.48:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red94.1%
Green16.5%
Blue100.0%

CMYK percentages

Cyan5.9%
Magenta83.5%
Yellow0.0%
Key (black)0.0%

Color previews

#f02aff text on a black background

contrast 6.48:1

Card sample

#f02aff text on a white background

contrast 3.24:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #f02aff

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #f02aff in the Color Lab