#31168F#31168F
#31168F is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.9% C 0.179 H 281.2°. Best body text is #FFFFFF at 12.79:1 contrast (WCAG AA passes).
Color values
| HEX | #31168F |
|---|---|
| RGB | rgb(49, 22, 143) |
| HSL | hsl(253, 73%, 32%) |
| HSV | hsv(253, 85%, 56%) |
| CMYK | cmyk(65.7%, 84.6%, 0%, 43.9%) |
| CIE-LAB | lab(20.86, 45.68, -60.93) |
| CIE-LCH | lch(20.86, 76.15, 306.86°) |
| OKLab | oklab(33.86% 0.0349 -0.1758) |
| OKLCH | oklch(33.86% 0.179 281.2) |
| XYZ | xyz(6.5099, 3.2095, 26.2577) |
| Luminance | 0.0321 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Royal
#0C1793
ΔE00 3.07
Indigo (survey)
#380282
ΔE00 3.49
Cobalt Blue
#030AA7
ΔE00 4.22
Royal Blue (survey)
#0504AA
ΔE00 4.57
Darkblue
#00008B
ΔE00 4.64
Indigo Blue
#3A18B1
ΔE00 4.88
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#31168F #748F16
analogous
#16388F #31168F #6D168F
triadic
#31168F #8F3116 #168F31
tetradic
#31168F #8F1638 #748F16 #168F6D
square
#31168F #8F1638 #748F16 #168F6D
split-complementary
#31168F #8F6D16 #388F16
monochromatic
#0D0625 #1F0E5A #31168F #431EC4 #633EE1
Accessibility & contrast
On white
12.79
#31168F on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.64
#31168F on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #31168F
12.79:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##31168F | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##31168F | 1.00 | 12.79 | 1.64 | 12.79 |
| #FFFFFF | 12.79 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.64 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 12.79 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003692
Deuteranopia (green-blind)
#002E8D
Tritanopia (blue-blind)
#003C54
Achromatopsia (no color)
#323232
Design tokens & code
CSS
--color: #31168f; /* rgb */ color: rgb(49, 22, 143); /* oklch */ color: oklch(33.9% 0.179 281.2);
Tailwind
colors: {
custom: {
50: '#7759b1',
500: '#31168f',
950: '#000000',
},
}SCSS
$custom: #31168f; $custom-light: #7759b1; $custom-dark: #000000;
JSON
{
"hex": "#31168f",
"rgb": {
"r": 49,
"g": 22,
"b": 143
},
"hsl": {
"h": 253.388,
"s": 73.333,
"l": 32.353
},
"oklch": {
"l": 0.33858,
"c": 0.17924,
"h": 281.2
},
"luminance": 0.0321
}Semantic roles & 50–950 ramp
primary
#31168F
secondary
#A4C13F
accent
#F038C7
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980