Skip to content

#af4dfb

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

RGB
175, 77, 251
HSL
274°, 96%, 64%
CMYK
30, 69, 0, 2
Luminance
0.2139

Every format

HEX#af4dfb
RGBrgb(175, 77, 251)
HSLhsl(274, 96%, 64%)
CMYKcmyk(30%, 69%, 0%, 2%)
LABlab(53.4 68.5 -70.4)
LCHlch(53.4 98.2 314.2)
OKLCHoklch(0.628 0.248 306.2)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#af4dfb on white: 3.98:1
AA ✗ fail · AA-large · AAA
Aa
#af4dfb on black: 5.28:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red68.6%
Green30.2%
Blue98.4%

CMYK percentages

Cyan30.3%
Magenta69.3%
Yellow0.0%
Key (black)1.6%

Color previews

#af4dfb text on a black background

contrast 5.28:1

Card sample

#af4dfb text on a white background

contrast 3.98:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #af4dfb

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #af4dfb in the Color Lab