#31158E#31158E
#31158E is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.6% C 0.179 H 281.5°. Best body text is #FFFFFF at 12.90:1 contrast (WCAG AA passes).
Color values
| HEX | #31158E |
|---|---|
| RGB | rgb(49, 21, 142) |
| HSL | hsl(254, 74%, 32%) |
| HSV | hsv(254, 85%, 56%) |
| CMYK | cmyk(65.5%, 85.2%, 0%, 44.3%) |
| CIE-LAB | lab(20.60, 45.81, -60.74) |
| CIE-LCH | lch(20.60, 76.08, 307.02°) |
| OKLab | oklab(33.65% 0.0357 -0.1752) |
| OKLCH | oklch(33.65% 0.179 281.5) |
| XYZ | xyz(6.4157, 3.1418, 25.8543) |
| Luminance | 0.0314 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Royal
#0C1793
ΔE00 3.14
Indigo (survey)
#380282
ΔE00 3.27
Cobalt Blue
#030AA7
ΔE00 4.28
Darkblue
#00008B
ΔE00 4.51
Royal Blue (survey)
#0504AA
ΔE00 4.61
Ultramarine
#2000B1
ΔE00 4.96
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#31158E #728E15
analogous
#15368E #31158E #6E158E
triadic
#31158E #8E3115 #158E31
tetradic
#31158E #8E1536 #728E15 #158E6E
square
#31158E #8E1536 #728E15 #158E6E
split-complementary
#31158E #8E6E15 #368E15
monochromatic
#0C0523 #1F0D59 #31158E #431DC3 #623BE2
Accessibility & contrast
On white
12.90
#31158E on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.63
#31158E on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #31158E
12.90:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##31158E | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##31158E | 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)
#003691
Deuteranopia (green-blind)
#002D8C
Tritanopia (blue-blind)
#003C53
Achromatopsia (no color)
#323232
Design tokens & code
CSS
--color: #31158e; /* rgb */ color: rgb(49, 21, 142); /* oklch */ color: oklch(33.6% 0.179 281.5);
Tailwind
colors: {
custom: {
50: '#7758b0',
500: '#31158e',
950: '#000000',
},
}SCSS
$custom: #31158e; $custom-light: #7758b0; $custom-dark: #000000;
JSON
{
"hex": "#31158e",
"rgb": {
"r": 49,
"g": 21,
"b": 142
},
"hsl": {
"h": 253.884,
"s": 74.233,
"l": 31.961
},
"oklch": {
"l": 0.33645,
"c": 0.17885,
"h": 281.5
},
"luminance": 0.03142
}Semantic roles & 50–950 ramp
primary
#31158E
secondary
#A3C23D
accent
#F137C6
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980