Skip to content

#f040ff

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

RGB
240, 64, 255
HSL
295°, 100%, 63%
CMYK
6, 75, 0, 0
Luminance
0.2941

Every format

HEX#f040ff
RGBrgb(240, 64, 255)
HSLhsl(295, 100%, 63%)
CMYKcmyk(6%, 75%, 0%, 0%)
LABlab(61.1 86.2 -59.6)
LCHlch(61.1 104.8 325.3)
OKLCHoklch(0.703 0.287 324.5)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#f040ff on white: 3.05:1
AA ✗ fail · AA-large · AAA
Aa
#f040ff on black: 6.88:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red94.1%
Green25.1%
Blue100.0%

CMYK percentages

Cyan5.9%
Magenta74.9%
Yellow0.0%
Key (black)0.0%

Color previews

#f040ff text on a black background

contrast 6.88:1

Card sample

#f040ff text on a white background

contrast 3.05:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #f040ff

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #f040ff in the Color Lab