#AF42AB#AF42AB
#AF42AB is a mid, vivid purple. Relative luminance 0.160; OKLCH L 56.7% C 0.188 H 329.2°. Best body text is #FFFFFF at 5.01:1 contrast (WCAG AA passes).
Color values
| HEX | #AF42AB |
|---|---|
| RGB | rgb(175, 66, 171) |
| HSL | hsl(302, 45%, 47%) |
| HSV | hsv(302, 62%, 69%) |
| CMYK | cmyk(0%, 62.3%, 2.3%, 31.4%) |
| CIE-LAB | lab(46.91, 57.42, -34.98) |
| CIE-LCH | lch(46.91, 67.24, 328.65°) |
| OKLab | oklab(56.67% 0.1616 -0.0963) |
| OKLCH | oklch(56.67% 0.188 329.2) |
| XYZ | xyz(26.9778, 15.9525, 40.1784) |
| Luminance | 0.1595 (WCAG relative) |
| Temperature | neutral |
| Family | purple |
Closest named colors
Ugly Purple
#A442A0
ΔE00 2.56
Medium Purple
#9E43A2
ΔE00 3.36
Purpley Pink
#C83CB9
ΔE00 4.72
Purply
#983FB2
ΔE00 5.67
Barney
#AC1DB8
ΔE00 6.00
Pinky Purple
#C94CBE
ΔE00 6.56
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#AF42AB #42AF46
analogous
#7D42AF #AF42AB #AF4274
triadic
#AF42AB #ABAF42 #42ABAF
tetradic
#AF42AB #AF7D42 #42AF46 #4274AF
square
#AF42AB #AF7D42 #42AF46 #4274AF
split-complementary
#AF42AB #74AF42 #42AF7D
monochromatic
#562054 #833180 #AF42AB #C668C3 #D795D4
Accessibility & contrast
On white
5.01
#AF42AB on #FFFFFF
AA ✓AA large ✓AAA ✗
On black
4.19
#AF42AB on #000000
AA ✗AA large ✓AAA ✗
Best text color
#FFFFFF on #AF42AB
5.01:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##AF42AB | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##AF42AB | 1.00 | 5.01 | 4.19 | 5.01 |
| #FFFFFF | 5.01 | 1.00 | 21.00 | 1.00 |
| #000000 | 4.19 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 5.01 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#3866AE
Deuteranopia (green-blind)
#5E74A8
Tritanopia (blue-blind)
#B54F70
Achromatopsia (no color)
#6F6F6F
Design tokens & code
CSS
--color: #af42ab; /* rgb */ color: rgb(175, 66, 171); /* oklch */ color: oklch(56.7% 0.188 329.2);
Tailwind
colors: {
custom: {
50: '#ca7ec4',
500: '#af42ab',
950: '#000000',
},
}SCSS
$custom: #af42ab; $custom-light: #ca7ec4; $custom-dark: #000000;
JSON
{
"hex": "#af42ab",
"rgb": {
"r": 175,
"g": 66,
"b": 171
},
"hsl": {
"h": 302.202,
"s": 45.228,
"l": 47.255
},
"oklch": {
"l": 0.56667,
"c": 0.18809,
"h": 329.2
},
"luminance": 0.15951
}Semantic roles & 50–950 ramp
primary
#AF42AB
secondary
#8AC28C
accent
#D55853
background
#FCF8FC
surface
#F9EFF8
border
#D2CAD1
text
#140A13
muted
#827C82