Skip to content

#af40ff

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

RGB
175, 64, 255
HSL
275°, 100%, 63%
CMYK
31, 75, 0, 0
Luminance
0.2000

Every format

HEX#af40ff
RGBrgb(175, 64, 255)
HSLhsl(275, 100%, 63%)
CMYKcmyk(31%, 75%, 0%, 0%)
LABlab(51.8 74.5 -75.1)
LCHlch(51.8 105.8 314.8)
OKLCHoklch(0.618 0.265 306.4)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#af40ff on white: 4.20:1
AA ✗ fail · AA-large · AAA
Aa
#af40ff on black: 5.00:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red68.6%
Green25.1%
Blue100.0%

CMYK percentages

Cyan31.4%
Magenta74.9%
Yellow0.0%
Key (black)0.0%

Color previews

#af40ff text on a black background

contrast 5.00:1

Card sample

#af40ff text on a white background

contrast 4.20:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #af40ff

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #af40ff in the Color Lab