#331C7E#331C7E
#331C7E is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.9% C 0.153 H 285.0°. Best body text is #FFFFFF at 13.06:1 contrast (WCAG AA passes).
Color values
| HEX | #331C7E |
|---|---|
| RGB | rgb(51, 28, 126) |
| HSL | hsl(254, 64%, 30%) |
| HSV | hsv(254, 78%, 49%) |
| CMYK | cmyk(59.5%, 77.8%, 0%, 50.6%) |
| CIE-LAB | lab(20.20, 37.87, -51.32) |
| CIE-LCH | lch(20.20, 63.78, 306.42°) |
| OKLab | oklab(32.9% 0.0397 -0.1478) |
| OKLCH | oklch(32.9% 0.153 285) |
| XYZ | xyz(5.5452, 3.0403, 20.0293) |
| Luminance | 0.0304 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Midnight Blue
#191970
ΔE00 3.99
Indigo (survey)
#380282
ΔE00 4.13
Royal
#0C1793
ΔE00 4.77
Indigo
#4B0082
ΔE00 5.59
Darkblue
#00008B
ΔE00 6.16
Navy
#000080
ΔE00 6.22
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#331C7E #677E1C
analogous
#1C367E #331C7E #641C7E
triadic
#331C7E #7E331C #1C7E33
tetradic
#331C7E #7E1C36 #677E1C #1C7E64
square
#331C7E #7E1C36 #677E1C #1C7E64
split-complementary
#331C7E #7E641C #367E1C
monochromatic
#0A061A #1F114C #331C7E #4727B0 #6340D5
Accessibility & contrast
On white
13.06
#331C7E on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.61
#331C7E on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #331C7E
13.06:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##331C7E | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##331C7E | 1.00 | 13.06 | 1.61 | 13.06 |
| #FFFFFF | 13.06 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.61 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 13.06 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003381
Deuteranopia (green-blind)
#002E7C
Tritanopia (blue-blind)
#0B384C
Achromatopsia (no color)
#313131
Design tokens & code
CSS
--color: #331c7e; /* rgb */ color: rgb(51, 28, 126); /* oklch */ color: oklch(32.9% 0.153 285.0);
Tailwind
colors: {
custom: {
50: '#745ba4',
500: '#331c7e',
950: '#000000',
},
}SCSS
$custom: #331c7e; $custom-light: #745ba4; $custom-dark: #000000;
JSON
{
"hex": "#331c7e",
"rgb": {
"r": 51,
"g": 28,
"b": 126
},
"hsl": {
"h": 254.082,
"s": 63.636,
"l": 30.196
},
"oklch": {
"l": 0.32896,
"c": 0.15307,
"h": 285
},
"luminance": 0.03041
}Semantic roles & 50–950 ramp
primary
#331C7E
secondary
#98B244
accent
#E741C0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F