#331D7E#331D7E
#331D7E is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.0% C 0.152 H 284.9°. Best body text is #FFFFFF at 12.98:1 contrast (WCAG AA passes).
Color values
| HEX | #331D7E |
|---|---|
| RGB | rgb(51, 29, 126) |
| HSL | hsl(254, 63%, 30%) |
| HSV | hsv(254, 77%, 49%) |
| CMYK | cmyk(59.5%, 77%, 0%, 50.6%) |
| CIE-LAB | lab(20.40, 37.33, -51.01) |
| CIE-LCH | lch(20.40, 63.21, 306.20°) |
| OKLab | oklab(33.03% 0.039 -0.1469) |
| OKLCH | oklch(33.03% 0.152 284.9) |
| XYZ | xyz(5.5694, 3.0886, 20.0373) |
| Luminance | 0.0309 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Midnight Blue
#191970
ΔE00 3.97
Indigo (survey)
#380282
ΔE00 4.36
Royal
#0C1793
ΔE00 4.82
Indigo
#4B0082
ΔE00 5.76
Darkblue
#00008B
ΔE00 6.33
Dark Royal Blue
#02066F
ΔE00 6.36
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#331D7E #687E1D
analogous
#1D377E #331D7E #631D7E
triadic
#331D7E #7E331D #1D7E33
tetradic
#331D7E #7E1D37 #687E1D #1D7E63
square
#331D7E #7E1D37 #687E1D #1D7E63
split-complementary
#331D7E #7E631D #377E1D
monochromatic
#0B061B #1F124C #331D7E #4728B0 #6342D3
Accessibility & contrast
On white
12.98
#331D7E on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.62
#331D7E on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #331D7E
12.98:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##331D7E | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##331D7E | 1.00 | 12.98 | 1.62 | 12.98 |
| #FFFFFF | 12.98 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.62 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 12.98 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003481
Deuteranopia (green-blind)
#002E7C
Tritanopia (blue-blind)
#0B384C
Achromatopsia (no color)
#313131
Design tokens & code
CSS
--color: #331d7e; /* rgb */ color: rgb(51, 29, 126); /* oklch */ color: oklch(33.0% 0.152 284.9);
Tailwind
colors: {
custom: {
50: '#745ca4',
500: '#331d7e',
950: '#000000',
},
}SCSS
$custom: #331d7e; $custom-light: #745ca4; $custom-dark: #000000;
JSON
{
"hex": "#331d7e",
"rgb": {
"r": 51,
"g": 29,
"b": 126
},
"hsl": {
"h": 253.608,
"s": 62.581,
"l": 30.392
},
"oklch": {
"l": 0.3303,
"c": 0.15199,
"h": 284.9
},
"luminance": 0.03089
}Semantic roles & 50–950 ramp
primary
#331D7E
secondary
#99B145
accent
#E642C1
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F