#9840B2#9840B2
#9840B2 is a mid, vivid purple. Relative luminance 0.136; OKLCH L 53.7% C 0.186 H 317.7°. Best body text is #FFFFFF at 5.66:1 contrast (WCAG AA passes).
Color values
| HEX | #9840B2 |
|---|---|
| RGB | rgb(152, 64, 178) |
| HSL | hsl(286, 47%, 47%) |
| HSV | hsv(286, 64%, 70%) |
| CMYK | cmyk(14.6%, 64%, 0%, 30.2%) |
| CIE-LAB | lab(43.59, 53.89, -44.59) |
| CIE-LCH | lch(43.59, 69.94, 320.40°) |
| OKLab | oklab(53.7% 0.1373 -0.1248) |
| OKLCH | oklch(53.7% 0.186 317.7) |
| XYZ | xyz(22.8170, 13.5575, 43.5258) |
| Luminance | 0.1356 (WCAG relative) |
| Temperature | cool |
| Family | purple |
Closest named colors
Purply
#983FB2
ΔE00 0.20
Medium Purple
#9E43A2
ΔE00 3.86
Darkorchid
#9932CC
ΔE00 4.63
Barney
#AC1DB8
ΔE00 4.66
Ugly Purple
#A442A0
ΔE00 5.08
Warm Purple
#952E8F
ΔE00 7.03
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#9840B2 #5AB240
analogous
#5F40B2 #9840B2 #B24093
triadic
#9840B2 #B29840 #40B298
tetradic
#9840B2 #B25F40 #5AB240 #4093B2
square
#9840B2 #B25F40 #5AB240 #4093B2
split-complementary
#9840B2 #93B240 #40B25F
monochromatic
#4B2058 #723085 #9840B2 #B267C8 #C994D8
Accessibility & contrast
On white
5.66
#9840B2 on #FFFFFF
AA ✓AA large ✓AAA ✗
On black
3.71
#9840B2 on #000000
AA ✗AA large ✓AAA ✗
Best text color
#FFFFFF on #9840B2
5.66:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##9840B2 | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##9840B2 | 1.00 | 5.66 | 3.71 | 5.66 |
| #FFFFFF | 5.66 | 1.00 | 21.00 | 1.00 |
| #000000 | 3.71 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 5.66 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#1A61B5
Deuteranopia (green-blind)
#446AAF
Tritanopia (blue-blind)
#975473
Achromatopsia (no color)
#676767
Design tokens & code
CSS
--color: #9840b2; /* rgb */ color: rgb(152, 64, 178); /* oklch */ color: oklch(53.7% 0.186 317.7);
Tailwind
colors: {
custom: {
50: '#b97bc9',
500: '#9840b2',
950: '#000000',
},
}SCSS
$custom: #9840b2; $custom-light: #b97bc9; $custom-dark: #000000;
JSON
{
"hex": "#9840b2",
"rgb": {
"r": 152,
"g": 64,
"b": 178
},
"hsl": {
"h": 286.316,
"s": 47.107,
"l": 47.451
},
"oklch": {
"l": 0.53696,
"c": 0.18555,
"h": 317.7
},
"luminance": 0.13557
}Semantic roles & 50–950 ramp
primary
#9840B2
secondary
#97C48A
accent
#D75170
background
#FBF7FC
surface
#F7EEF8
border
#D0C9D1
text
#120A13
muted
#817C82