#331F88#331F88
#331F88 is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.3% C 0.162 H 282.4°. Best body text is #FFFFFF at 12.41:1 contrast (WCAG AA passes).
Color values
| HEX | #331F88 |
|---|---|
| RGB | rgb(51, 31, 136) |
| HSL | hsl(251, 63%, 33%) |
| HSV | hsv(251, 77%, 53%) |
| CMYK | cmyk(62.5%, 77.2%, 0%, 46.7%) |
| CIE-LAB | lab(21.80, 39.38, -55.00) |
| CIE-LCH | lch(21.80, 67.65, 305.61°) |
| OKLab | oklab(34.33% 0.0348 -0.1586) |
| OKLCH | oklch(34.33% 0.162 282.4) |
| XYZ | xyz(6.2978, 3.4609, 23.6239) |
| Luminance | 0.0346 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Royal
#0C1793
ΔE00 3.91
Indigo (survey)
#380282
ΔE00 4.69
Midnight Blue
#191970
ΔE00 4.89
Cobalt Blue
#030AA7
ΔE00 5.91
Indigo Blue
#3A18B1
ΔE00 5.94
Indigo
#4B0082
ΔE00 6.10
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#331F88 #74881F
analogous
#1F3F88 #331F88 #681F88
triadic
#331F88 #88331F #1F8833
tetradic
#331F88 #881F3F #74881F #1F8868
square
#331F88 #881F3F #74881F #1F8868
split-complementary
#331F88 #88681F #3F881F
monochromatic
#0E0824 #201456 #331F88 #462ABA #664BD6
Accessibility & contrast
On white
12.41
#331F88 on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.69
#331F88 on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #331F88
12.41:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##331F88 | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##331F88 | 1.00 | 12.41 | 1.69 | 12.41 |
| #FFFFFF | 12.41 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.69 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 12.41 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#00388B
Deuteranopia (green-blind)
#003186
Tritanopia (blue-blind)
#003D52
Achromatopsia (no color)
#343434
Design tokens & code
CSS
--color: #331f88; /* rgb */ color: rgb(51, 31, 136); /* oklch */ color: oklch(34.3% 0.162 282.4);
Tailwind
colors: {
custom: {
50: '#765dac',
500: '#331f88',
950: '#000000',
},
}SCSS
$custom: #331f88; $custom-light: #765dac; $custom-dark: #000000;
JSON
{
"hex": "#331f88",
"rgb": {
"r": 51,
"g": 31,
"b": 136
},
"hsl": {
"h": 251.429,
"s": 62.874,
"l": 32.745
},
"oklch": {
"l": 0.3433,
"c": 0.16238,
"h": 282.4
},
"luminance": 0.03461
}Semantic roles & 50–950 ramp
primary
#331F88
secondary
#A4B94A
accent
#E642C7
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F