Skip to content

#af2afc

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

RGB
175, 42, 252
HSL
278°, 97%, 58%
CMYK
31, 83, 0, 1
Luminance
0.1780

Every format

HEX#af2afc
RGBrgb(175, 42, 252)
HSLhsl(278, 97%, 58%)
CMYKcmyk(31%, 83%, 0%, 1%)
LABlab(49.3 80.8 -77.7)
LCHlch(49.3 112.0 316.1)
OKLCHoklch(0.600 0.281 308.1)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#af2afc on white: 4.61:1
AA ✓ pass · AA-large · AAA
Aa
#af2afc on black: 4.56:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red68.6%
Green16.5%
Blue98.8%

CMYK percentages

Cyan30.6%
Magenta83.3%
Yellow0.0%
Key (black)1.2%

Color previews

#af2afc text on a black background

contrast 4.56:1

Card sample

#af2afc text on a white background

contrast 4.61:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #af2afc

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #af2afc in the Color Lab