Skip to content

#af2def

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

RGB
175, 45, 239
HSL
280°, 86%, 56%
CMYK
27, 81, 0, 6
Luminance
0.1722

Every format

HEX#af2def
RGBrgb(175, 45, 239)
HSLhsl(280, 86%, 56%)
CMYKcmyk(27%, 81%, 0%, 6%)
LABlab(48.5 77.4 -71.5)
LCHlch(48.5 105.4 317.3)
OKLCHoklch(0.592 0.268 310.8)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#af2def on white: 4.72:1
AA ✓ pass · AA-large · AAA
Aa
#af2def on black: 4.44:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red68.6%
Green17.6%
Blue93.7%

CMYK percentages

Cyan26.8%
Magenta81.2%
Yellow0.0%
Key (black)6.3%

Color previews

#af2def text on a black background

contrast 4.44:1

Card sample

#af2def text on a white background

contrast 4.72:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #af2def

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #af2def in the Color Lab