#402197#402197
#402197 is a dark, vivid violet. Relative luminance 0.044; OKLCH L 37.3% C 0.177 H 286.2°. Best body text is #FFFFFF at 11.16:1 contrast (WCAG AA passes).
Color values
| HEX | #402197 |
|---|---|
| RGB | rgb(64, 33, 151) |
| HSL | hsl(256, 64%, 36%) |
| HSV | hsv(256, 78%, 59%) |
| CMYK | cmyk(57.6%, 78.1%, 0%, 40.8%) |
| CIE-LAB | lab(24.99, 44.64, -59.02) |
| CIE-LCH | lch(24.99, 74.00, 307.10°) |
| OKLab | oklab(37.34% 0.0493 -0.1699) |
| OKLCH | oklch(37.34% 0.177 286.2) |
| XYZ | xyz(8.2424, 4.4116, 29.6894) |
| Luminance | 0.0441 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Indigo Blue
#3A18B1
ΔE00 3.83
Royal
#0C1793
ΔE00 5.24
Indigo (survey)
#380282
ΔE00 5.61
Ultramarine
#2000B1
ΔE00 5.81
Cobalt Blue
#030AA7
ΔE00 5.86
Indigo
#4B0082
ΔE00 5.99
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#402197 #789721
analogous
#213D97 #402197 #7B2197
triadic
#402197 #974021 #219740
tetradic
#402197 #97213D #789721 #21977B
square
#402197 #97213D #789721 #21977B
split-complementary
#402197 #977B21 #3D9721
monochromatic
#150B33 #2B1665 #402197 #552CC9 #7A58DA
Accessibility & contrast
On white
11.16
#402197 on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.88
#402197 on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #402197
11.16:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##402197 | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##402197 | 1.00 | 11.16 | 1.88 | 11.16 |
| #FFFFFF | 11.16 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.88 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 11.16 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003E9A
Deuteranopia (green-blind)
#003895
Tritanopia (blue-blind)
#16435B
Achromatopsia (no color)
#3B3B3B
Design tokens & code
CSS
--color: #402197; /* rgb */ color: rgb(64, 33, 151); /* oklch */ color: oklch(37.3% 0.177 286.2);
Tailwind
colors: {
custom: {
50: '#7f60b7',
500: '#402197',
950: '#000000',
},
}SCSS
$custom: #402197; $custom-light: #7f60b7; $custom-dark: #000000;
JSON
{
"hex": "#402197",
"rgb": {
"r": 64,
"g": 33,
"b": 151
},
"hsl": {
"h": 255.763,
"s": 64.13,
"l": 36.078
},
"oklch": {
"l": 0.37338,
"c": 0.17696,
"h": 286.2
},
"luminance": 0.04412
}Semantic roles & 50–950 ramp
primary
#402197
secondary
#A3BE55
accent
#E741BB
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980