#31168C#31168C
#31168C is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.5% C 0.176 H 281.8°. Best body text is #FFFFFF at 12.93:1 contrast (WCAG AA passes).
Color values
| HEX | #31168C |
|---|---|
| RGB | rgb(49, 22, 140) |
| HSL | hsl(254, 73%, 32%) |
| HSV | hsv(254, 84%, 55%) |
| CMYK | cmyk(65%, 84.3%, 0%, 45.1%) |
| CIE-LAB | lab(20.52, 44.79, -59.63) |
| CIE-LCH | lch(20.52, 74.58, 306.91°) |
| OKLab | oklab(33.52% 0.0359 -0.172) |
| OKLCH | oklch(33.52% 0.176 281.8) |
| XYZ | xyz(6.2857, 3.1198, 25.0768) |
| Luminance | 0.0312 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Royal
#0C1793
ΔE00 3.19
Indigo (survey)
#380282
ΔE00 3.27
Cobalt Blue
#030AA7
ΔE00 4.56
Darkblue
#00008B
ΔE00 4.61
Royal Blue (survey)
#0504AA
ΔE00 4.91
Indigo
#4B0082
ΔE00 5.23
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#31168C #718C16
analogous
#16368C #31168C #6C168C
triadic
#31168C #8C3116 #168C31
tetradic
#31168C #8C1636 #718C16 #168C6C
square
#31168C #8C1636 #718C16 #168C6C
split-complementary
#31168C #8C6C16 #368C16
monochromatic
#0C0522 #1E0E57 #31168C #441EC1 #623CE0
Accessibility & contrast
On white
12.93
#31168C on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.62
#31168C on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #31168C
12.93:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##31168C | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##31168C | 1.00 | 12.93 | 1.62 | 12.93 |
| #FFFFFF | 12.93 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.62 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 12.93 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#00358F
Deuteranopia (green-blind)
#002D8A
Tritanopia (blue-blind)
#003B52
Achromatopsia (no color)
#313131
Design tokens & code
CSS
--color: #31168c; /* rgb */ color: rgb(49, 22, 140); /* oklch */ color: oklch(33.5% 0.176 281.8);
Tailwind
colors: {
custom: {
50: '#7759af',
500: '#31168c',
950: '#000000',
},
}SCSS
$custom: #31168c; $custom-light: #7759af; $custom-dark: #000000;
JSON
{
"hex": "#31168c",
"rgb": {
"r": 49,
"g": 22,
"b": 140
},
"hsl": {
"h": 253.729,
"s": 72.84,
"l": 31.765
},
"oklch": {
"l": 0.33518,
"c": 0.17576,
"h": 281.8
},
"luminance": 0.0312
}Semantic roles & 50–950 ramp
primary
#31168C
secondary
#A2C03E
accent
#F038C6
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0411
muted
#7C7980