Skip to content

#af2aff

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

RGB
175, 42, 255
HSL
278°, 100%, 58%
CMYK
31, 84, 0, 0
Luminance
0.1799

Every format

HEX#af2aff
RGBrgb(175, 42, 255)
HSLhsl(278, 100%, 58%)
CMYKcmyk(31%, 84%, 0%, 0%)
LABlab(49.5 81.3 -79.0)
LCHlch(49.5 113.4 315.9)
OKLCHoklch(0.602 0.283 307.5)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#af2aff on white: 4.57:1
AA ✓ pass · AA-large · AAA
Aa
#af2aff on black: 4.60:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red68.6%
Green16.5%
Blue100.0%

CMYK percentages

Cyan31.4%
Magenta83.5%
Yellow0.0%
Key (black)0.0%

Color previews

#af2aff text on a black background

contrast 4.60:1

Card sample

#af2aff text on a white background

contrast 4.57:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #af2aff

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #af2aff in the Color Lab