#331986#331986
#331986 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.4% C 0.166 H 283.8°. Best body text is #FFFFFF at 12.93:1 contrast (WCAG AA passes).
Color values
| HEX | #331986 |
|---|---|
| RGB | rgb(51, 25, 134) |
| HSL | hsl(254, 69%, 31%) |
| HSV | hsv(254, 81%, 53%) |
| CMYK | cmyk(61.9%, 81.3%, 0%, 47.5%) |
| CIE-LAB | lab(20.52, 41.84, -55.86) |
| CIE-LCH | lch(20.52, 69.80, 306.83°) |
| OKLab | oklab(33.37% 0.0394 -0.161) |
| OKLCH | oklch(33.37% 0.166 283.8) |
| XYZ | xyz(6.0146, 3.1199, 22.8349) |
| Luminance | 0.0312 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Indigo (survey)
#380282
ΔE00 3.41
Royal
#0C1793
ΔE00 3.83
Midnight Blue
#191970
ΔE00 4.80
Indigo
#4B0082
ΔE00 5.14
Darkblue
#00008B
ΔE00 5.27
Cobalt Blue
#030AA7
ΔE00 5.61
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#331986 #6C8619
analogous
#193586 #331986 #691986
triadic
#331986 #863319 #198633
tetradic
#331986 #861935 #6C8619 #198669
square
#331986 #861935 #6C8619 #198669
split-complementary
#331986 #866919 #358619
monochromatic
#0C061F #1F0F52 #331986 #4723BA #643EDB
Accessibility & contrast
On white
12.93
#331986 on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.62
#331986 on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #331986
12.93:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##331986 | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##331986 | 1.00 | 12.93 | 1.62 | 12.93 |
| #FFFFFF | 12.93 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.62 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 12.93 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003589
Deuteranopia (green-blind)
#002E84
Tritanopia (blue-blind)
#003A50
Achromatopsia (no color)
#313131
Design tokens & code
CSS
--color: #331986; /* rgb */ color: rgb(51, 25, 134); /* oklch */ color: oklch(33.4% 0.166 283.8);
Tailwind
colors: {
custom: {
50: '#765aaa',
500: '#331986',
950: '#000000',
},
}SCSS
$custom: #331986; $custom-light: #765aaa; $custom-dark: #000000;
JSON
{
"hex": "#331986",
"rgb": {
"r": 51,
"g": 25,
"b": 134
},
"hsl": {
"h": 254.312,
"s": 68.553,
"l": 31.176
},
"oklch": {
"l": 0.33368,
"c": 0.16581,
"h": 283.8
},
"luminance": 0.0312
}Semantic roles & 50–950 ramp
primary
#331986
secondary
#9DBA41
accent
#EB3CC2
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F