#331F7C#331F7C
#331F7C is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.1% C 0.147 H 284.9°. Best body text is #FFFFFF at 12.90:1 contrast (WCAG AA passes).
Color values
| HEX | #331F7C |
|---|---|
| RGB | rgb(51, 31, 124) |
| HSL | hsl(253, 60%, 30%) |
| HSV | hsv(253, 75%, 49%) |
| CMYK | cmyk(58.9%, 75%, 0%, 51.4%) |
| CIE-LAB | lab(20.59, 35.58, -49.42) |
| CIE-LCH | lch(20.59, 60.90, 305.76°) |
| OKLab | oklab(33.11% 0.0378 -0.1423) |
| OKLCH | oklch(33.11% 0.147 284.9) |
| XYZ | xyz(5.4922, 3.1387, 19.3813) |
| Luminance | 0.0314 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Midnight Blue
#191970
ΔE00 3.86
Indigo (survey)
#380282
ΔE00 4.93
Royal
#0C1793
ΔE00 5.21
Indigo
#4B0082
ΔE00 6.20
Dark Royal Blue
#02066F
ΔE00 6.63
Darkblue
#00008B
ΔE00 6.84
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#331F7C #687C1F
analogous
#1F3A7C #331F7C #611F7C
triadic
#331F7C #7C331F #1F7C33
tetradic
#331F7C #7C1F3A #687C1F #1F7C61
square
#331F7C #7C1F3A #687C1F #1F7C61
split-complementary
#331F7C #7C611F #3A7C1F
monochromatic
#0B071A #1F134B #331F7C #472BAD #6345D0
Accessibility & contrast
On white
12.90
#331F7C on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.63
#331F7C on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #331F7C
12.90:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##331F7C | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##331F7C | 1.00 | 12.90 | 1.63 | 12.90 |
| #FFFFFF | 12.90 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.63 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 12.90 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#00347F
Deuteranopia (green-blind)
#002F7A
Tritanopia (blue-blind)
#0E384B
Achromatopsia (no color)
#323232
Design tokens & code
CSS
--color: #331f7c; /* rgb */ color: rgb(51, 31, 124); /* oklch */ color: oklch(33.1% 0.147 284.9);
Tailwind
colors: {
custom: {
50: '#745da3',
500: '#331f7c',
950: '#000000',
},
}SCSS
$custom: #331f7c; $custom-light: #745da3; $custom-dark: #000000;
JSON
{
"hex": "#331f7c",
"rgb": {
"r": 51,
"g": 31,
"b": 124
},
"hsl": {
"h": 252.903,
"s": 60,
"l": 30.392
},
"oklch": {
"l": 0.33107,
"c": 0.1472,
"h": 284.9
},
"luminance": 0.03139
}Semantic roles & 50–950 ramp
primary
#331F7C
secondary
#99AF48
accent
#E345C1
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F