Skip to content

#af2dfe

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

RGB
175, 45, 254
HSL
277°, 99%, 59%
CMYK
31, 82, 0, 0
Luminance
0.1815

Every format

HEX#af2dfe
RGBrgb(175, 45, 254)
HSLhsl(277, 99%, 59%)
CMYKcmyk(31%, 82%, 0%, 0%)
LABlab(49.7 80.4 -78.1)
LCHlch(49.7 112.1 315.8)
OKLCHoklch(0.603 0.281 307.6)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#af2dfe on white: 4.54:1
AA ✓ pass · AA-large · AAA
Aa
#af2dfe on black: 4.63:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red68.6%
Green17.6%
Blue99.6%

CMYK percentages

Cyan31.1%
Magenta82.3%
Yellow0.0%
Key (black)0.4%

Color previews

#af2dfe text on a black background

contrast 4.63:1

Card sample

#af2dfe text on a white background

contrast 4.54:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(175, 45, 254, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(175, 45, 254, 0.45);
Border & gradient
Gradient panel
border: 3px solid #af2dfe;
background: linear-gradient(135deg, #af2dfe, #FE2DC2);

Monochromatic scale

Palettes built from #af2dfe

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #af2dfe in the Color Lab