#331B88#331B88
#331B88 is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.8% C 0.166 H 283.0°. Best body text is #FFFFFF at 12.70:1 contrast (WCAG AA passes).
Color values
| HEX | #331B88 |
|---|---|
| RGB | rgb(51, 27, 136) |
| HSL | hsl(253, 67%, 32%) |
| HSV | hsv(253, 80%, 53%) |
| CMYK | cmyk(62.5%, 80.1%, 0%, 46.7%) |
| CIE-LAB | lab(21.07, 41.47, -56.20) |
| CIE-LCH | lch(21.07, 69.84, 306.42°) |
| OKLab | oklab(33.82% 0.0375 -0.1621) |
| OKLCH | oklch(33.82% 0.166 283) |
| XYZ | xyz(6.1997, 3.2648, 23.5913) |
| Luminance | 0.0326 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Royal
#0C1793
ΔE00 3.70
Indigo (survey)
#380282
ΔE00 3.85
Midnight Blue
#191970
ΔE00 4.93
Indigo
#4B0082
ΔE00 5.46
Darkblue
#00008B
ΔE00 5.50
Cobalt Blue
#030AA7
ΔE00 5.51
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#331B88 #70881B
analogous
#1B3A88 #331B88 #6A1B88
triadic
#331B88 #88331B #1B8833
tetradic
#331B88 #881B3A #70881B #1B886A
square
#331B88 #881B3A #70881B #1B886A
split-complementary
#331B88 #886A1B #3A881B
monochromatic
#0D0722 #201155 #331B88 #4625BB #6544DA
Accessibility & contrast
On white
12.70
#331B88 on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.65
#331B88 on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #331B88
12.70:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##331B88 | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##331B88 | 1.00 | 12.70 | 1.65 | 12.70 |
| #FFFFFF | 12.70 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.65 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 12.70 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#00368B
Deuteranopia (green-blind)
#002F86
Tritanopia (blue-blind)
#003B51
Achromatopsia (no color)
#333333
Design tokens & code
CSS
--color: #331b88; /* rgb */ color: rgb(51, 27, 136); /* oklch */ color: oklch(33.8% 0.166 283.0);
Tailwind
colors: {
custom: {
50: '#765bac',
500: '#331b88',
950: '#000000',
},
}SCSS
$custom: #331b88; $custom-light: #765bac; $custom-dark: #000000;
JSON
{
"hex": "#331b88",
"rgb": {
"r": 51,
"g": 27,
"b": 136
},
"hsl": {
"h": 253.211,
"s": 66.871,
"l": 31.961
},
"oklch": {
"l": 0.3382,
"c": 0.16635,
"h": 283
},
"luminance": 0.03265
}Semantic roles & 50–950 ramp
primary
#331B88
secondary
#A1BB44
accent
#EA3EC4
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F