#31157F#31157F
#31157F is a dark, vivid violet. Relative luminance 0.027; OKLCH L 32.0% C 0.161 H 284.7°. Best body text is #FFFFFF at 13.60:1 contrast (WCAG AA passes).
Color values
| HEX | #31157F |
|---|---|
| RGB | rgb(49, 21, 127) |
| HSL | hsl(256, 72%, 29%) |
| HSV | hsv(256, 83%, 50%) |
| CMYK | cmyk(61.4%, 83.5%, 0%, 50.2%) |
| CIE-LAB | lab(18.89, 41.40, -54.13) |
| CIE-LCH | lch(18.89, 68.15, 307.41°) |
| OKLab | oklab(31.96% 0.041 -0.156) |
| OKLCH | oklch(31.96% 0.161 284.7) |
| XYZ | xyz(5.3644, 2.7213, 20.3171) |
| Luminance | 0.0272 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Indigo (survey)
#380282
ΔE00 2.79
Midnight Blue
#191970
ΔE00 4.23
Royal
#0C1793
ΔE00 4.37
Indigo
#4B0082
ΔE00 4.86
Darkblue
#00008B
ΔE00 4.95
Navy
#000080
ΔE00 5.00
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#31157F #637F15
analogous
#152E7F #31157F #66157F
triadic
#31157F #7F3115 #157F31
tetradic
#31157F #7F152E #637F15 #157F66
square
#31157F #7F152E #637F15 #157F66
split-complementary
#31157F #7F6615 #2E7F15
monochromatic
#0A041A #1D0C4A #31157F #451EB4 #5F31DD
Accessibility & contrast
On white
13.60
#31157F on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.54
#31157F on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #31157F
13.60:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##31157F | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##31157F | 1.00 | 13.60 | 1.54 | 13.60 |
| #FFFFFF | 13.60 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.54 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 13.60 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003182
Deuteranopia (green-blind)
#002B7D
Tritanopia (blue-blind)
#00354B
Achromatopsia (no color)
#2E2E2E
Design tokens & code
CSS
--color: #31157f; /* rgb */ color: rgb(49, 21, 127); /* oklch */ color: oklch(32.0% 0.161 284.7);
Tailwind
colors: {
custom: {
50: '#7457a5',
500: '#31157f',
950: '#000000',
},
}SCSS
$custom: #31157f; $custom-light: #7457a5; $custom-dark: #000000;
JSON
{
"hex": "#31157f",
"rgb": {
"r": 49,
"g": 21,
"b": 127
},
"hsl": {
"h": 255.849,
"s": 71.622,
"l": 29.02
},
"oklch": {
"l": 0.31961,
"c": 0.16131,
"h": 284.7
},
"luminance": 0.02722
}Semantic roles & 50–950 ramp
primary
#31157F
secondary
#94B43C
accent
#EE39BF
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F