#331F7F#331F7F
#331F7F is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.4% C 0.151 H 284.2°. Best body text is #FFFFFF at 12.78:1 contrast (WCAG AA passes).
Color values
| HEX | #331F7F |
|---|---|
| RGB | rgb(51, 31, 127) |
| HSL | hsl(253, 61%, 31%) |
| HSV | hsv(253, 76%, 50%) |
| CMYK | cmyk(59.8%, 75.6%, 0%, 50.2%) |
| CIE-LAB | lab(20.89, 36.54, -50.83) |
| CIE-LCH | lch(20.89, 62.60, 305.71°) |
| OKLab | oklab(33.41% 0.0371 -0.1464) |
| OKLCH | oklch(33.41% 0.151 284.2) |
| XYZ | xyz(5.6848, 3.2157, 20.3957) |
| Luminance | 0.0322 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Midnight Blue
#191970
ΔE00 4.05
Indigo (survey)
#380282
ΔE00 4.79
Royal
#0C1793
ΔE00 4.83
Indigo
#4B0082
ΔE00 6.12
Darkblue
#00008B
ΔE00 6.61
Dark Royal Blue
#02066F
ΔE00 6.69
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#331F7F #6B7F1F
analogous
#1F3B7F #331F7F #631F7F
triadic
#331F7F #7F331F #1F7F33
tetradic
#331F7F #7F1F3B #6B7F1F #1F7F63
square
#331F7F #7F1F3B #6B7F1F #1F7F63
split-complementary
#331F7F #7F631F #3B7F1F
monochromatic
#0B071D #1F134E #331F7F #472BB0 #6446D2
Accessibility & contrast
On white
12.78
#331F7F on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.64
#331F7F on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #331F7F
12.78:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##331F7F | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##331F7F | 1.00 | 12.78 | 1.64 | 12.78 |
| #FFFFFF | 12.78 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.64 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 12.78 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003582
Deuteranopia (green-blind)
#002F7D
Tritanopia (blue-blind)
#08394D
Achromatopsia (no color)
#323232
Design tokens & code
CSS
--color: #331f7f; /* rgb */ color: rgb(51, 31, 127); /* oklch */ color: oklch(33.4% 0.151 284.2);
Tailwind
colors: {
custom: {
50: '#745da5',
500: '#331f7f',
950: '#000000',
},
}SCSS
$custom: #331f7f; $custom-light: #745da5; $custom-dark: #000000;
JSON
{
"hex": "#331f7f",
"rgb": {
"r": 51,
"g": 31,
"b": 127
},
"hsl": {
"h": 252.5,
"s": 60.759,
"l": 30.98
},
"oklch": {
"l": 0.33408,
"c": 0.15104,
"h": 284.2
},
"luminance": 0.03216
}Semantic roles & 50–950 ramp
primary
#331F7F
secondary
#9CB248
accent
#E444C3
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F