#9840C0#9840C0
#9840C0 is a mid, vivid purple. Relative luminance 0.141; OKLCH L 54.6% C 0.199 H 313.4°. Best body text is #FFFFFF at 5.48:1 contrast (WCAG AA passes).
Color values
| HEX | #9840C0 |
|---|---|
| RGB | rgb(152, 64, 192) |
| HSL | hsl(281, 50%, 50%) |
| HSV | hsv(281, 67%, 75%) |
| CMYK | cmyk(20.8%, 66.7%, 0%, 24.7%) |
| CIE-LAB | lab(44.45, 56.78, -51.42) |
| CIE-LCH | lch(44.45, 76.60, 317.84°) |
| OKLab | oklab(54.59% 0.1368 -0.1448) |
| OKLCH | oklch(54.59% 0.199 313.4) |
| XYZ | xyz(24.2951, 14.1487, 51.3101) |
| Luminance | 0.1415 (WCAG relative) |
| Temperature | cool |
| Family | purple |
Closest named colors
Purply
#983FB2
ΔE00 2.41
Darkorchid
#9932CC
ΔE00 2.78
Barney
#AC1DB8
ΔE00 5.26
Vibrant Purple
#AD03DE
ΔE00 5.87
Medium Purple
#9E43A2
ΔE00 6.08
Blueviolet
#8A2BE2
ΔE00 6.71
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#9840C0 #68C040
analogous
#5840C0 #9840C0 #C040A8
triadic
#9840C0 #C09840 #40C098
tetradic
#9840C0 #C05840 #68C040 #40A8C0
square
#9840C0 #C05840 #68C040 #40A8C0
split-complementary
#9840C0 #A8C040 #40C058
monochromatic
#4F2164 #743092 #9840C0 #B16ECF #CA9CDE
Accessibility & contrast
On white
5.48
#9840C0 on #FFFFFF
AA ✓AA large ✓AAA ✗
On black
3.83
#9840C0 on #000000
AA ✗AA large ✓AAA ✗
Best text color
#FFFFFF on #9840C0
5.48:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##9840C0 | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##9840C0 | 1.00 | 5.48 | 3.83 | 5.48 |
| #FFFFFF | 5.48 | 1.00 | 21.00 | 1.00 |
| #000000 | 3.83 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 5.48 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#0064C4
Deuteranopia (green-blind)
#386BBD
Tritanopia (blue-blind)
#94597B
Achromatopsia (no color)
#696969
Design tokens & code
CSS
--color: #9840c0; /* rgb */ color: rgb(152, 64, 192); /* oklch */ color: oklch(54.6% 0.199 313.4);
Tailwind
colors: {
custom: {
50: '#ba7bd4',
500: '#9840c0',
950: '#000000',
},
}SCSS
$custom: #9840c0; $custom-light: #ba7bd4; $custom-dark: #000000;
JSON
{
"hex": "#9840c0",
"rgb": {
"r": 152,
"g": 64,
"b": 192
},
"hsl": {
"h": 281.25,
"s": 50.394,
"l": 50.196
},
"oklch": {
"l": 0.54586,
"c": 0.19921,
"h": 313.4
},
"luminance": 0.14148
}Semantic roles & 50–950 ramp
primary
#9840C0
secondary
#A3CB91
accent
#DA4E7A
background
#FBF7FD
surface
#F7EEFA
border
#D0C9D3
text
#120A14
muted
#817C83