Skip to content

#af42ff

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

RGB
175, 66, 255
HSL
275°, 100%, 63%
CMYK
31, 74, 0, 0
Luminance
0.2023

Every format

HEX#af42ff
RGBrgb(175, 66, 255)
HSLhsl(275, 100%, 63%)
CMYKcmyk(31%, 74%, 0%, 0%)
LABlab(52.1 73.8 -74.7)
LCHlch(52.1 105.0 314.6)
OKLCHoklch(0.620 0.263 306.2)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#af42ff on white: 4.16:1
AA ✗ fail · AA-large · AAA
Aa
#af42ff on black: 5.05:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red68.6%
Green25.9%
Blue100.0%

CMYK percentages

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

Color previews

#af42ff text on a black background

contrast 5.05:1

Card sample

#af42ff text on a white background

contrast 4.16:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #af42ff

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #af42ff in the Color Lab