Skip to content

#cf2afb

a balanced, electric violet · warm · closest name: magenta

RGB
207, 42, 251
HSL
287°, 96%, 58%
CMYK
18, 83, 0, 2
Luminance
0.2189

Every format

HEX#cf2afb
RGBrgb(207, 42, 251)
HSLhsl(287, 96%, 58%)
CMYKcmyk(18%, 83%, 0%, 2%)
LABlab(53.9 85.4 -69.3)
LCHlch(53.9 110.0 320.9)
OKLCHoklch(0.641 0.289 317.4)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#cf2afb on white: 3.91:1
AA ✗ fail · AA-large · AAA
Aa
#cf2afb on black: 5.38:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red81.2%
Green16.5%
Blue98.4%

CMYK percentages

Cyan17.5%
Magenta83.3%
Yellow0.0%
Key (black)1.6%

Color previews

#cf2afb text on a black background

contrast 5.38:1

Card sample

#cf2afb text on a white background

contrast 3.91:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #cf2afb

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #cf2afb in the Color Lab