#31158F#31158F
#31158F is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.8% C 0.180 H 281.3°. Best body text is #FFFFFF at 12.85:1 contrast (WCAG AA passes).
Color values
| HEX | #31158F |
|---|---|
| RGB | rgb(49, 21, 143) |
| HSL | hsl(254, 74%, 32%) |
| HSV | hsv(254, 85%, 56%) |
| CMYK | cmyk(65.7%, 85.3%, 0%, 43.9%) |
| CIE-LAB | lab(20.72, 46.10, -61.17) |
| CIE-LCH | lch(20.72, 76.60, 307.00°) |
| OKLab | oklab(33.76% 0.0353 -0.1765) |
| OKLCH | oklch(33.76% 0.18 281.3) |
| XYZ | xyz(6.4912, 3.1720, 26.2515) |
| Luminance | 0.0317 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Royal
#0C1793
ΔE00 3.10
Indigo (survey)
#380282
ΔE00 3.36
Cobalt Blue
#030AA7
ΔE00 4.17
Royal Blue (survey)
#0504AA
ΔE00 4.50
Darkblue
#00008B
ΔE00 4.53
Ultramarine
#2000B1
ΔE00 4.83
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#31158F #738F15
analogous
#15368F #31158F #6E158F
triadic
#31158F #8F3115 #158F31
tetradic
#31158F #8F1536 #738F15 #158F6E
square
#31158F #8F1536 #738F15 #158F6E
split-complementary
#31158F #8F6E15 #368F15
monochromatic
#0C0524 #1F0D5A #31158F #431DC4 #623CE2
Accessibility & contrast
On white
12.85
#31158F on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.63
#31158F on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #31158F
12.85:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##31158F | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##31158F | 1.00 | 12.85 | 1.63 | 12.85 |
| #FFFFFF | 12.85 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.63 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 12.85 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003692
Deuteranopia (green-blind)
#002D8D
Tritanopia (blue-blind)
#003C54
Achromatopsia (no color)
#323232
Design tokens & code
CSS
--color: #31158f; /* rgb */ color: rgb(49, 21, 143); /* oklch */ color: oklch(33.8% 0.180 281.3);
Tailwind
colors: {
custom: {
50: '#7758b1',
500: '#31158f',
950: '#000000',
},
}SCSS
$custom: #31158f; $custom-light: #7758b1; $custom-dark: #000000;
JSON
{
"hex": "#31158f",
"rgb": {
"r": 49,
"g": 21,
"b": 143
},
"hsl": {
"h": 253.77,
"s": 74.39,
"l": 32.157
},
"oklch": {
"l": 0.3376,
"c": 0.18,
"h": 281.3
},
"luminance": 0.03172
}Semantic roles & 50–950 ramp
primary
#31158F
secondary
#A4C23E
accent
#F137C6
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980