#40218B#40218B
#40218B is a dark, vivid violet. Relative luminance 0.040; OKLCH L 36.2% C 0.163 H 288.9°. Best body text is #FFFFFF at 11.61:1 contrast (WCAG AA passes).
Color values
| HEX | #40218B |
|---|---|
| RGB | rgb(64, 33, 139) |
| HSL | hsl(258, 62%, 34%) |
| HSV | hsv(258, 76%, 55%) |
| CMYK | cmyk(54%, 76.3%, 0%, 45.5%) |
| CIE-LAB | lab(23.81, 41.11, -53.53) |
| CIE-LCH | lch(23.81, 67.50, 307.53°) |
| OKLab | oklab(36.15% 0.0526 -0.1539) |
| OKLCH | oklch(36.15% 0.163 288.9) |
| XYZ | xyz(7.3170, 4.0414, 24.8156) |
| Luminance | 0.0404 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Indigo (survey)
#380282
ΔE00 4.95
Indigo
#4B0082
ΔE00 5.24
Royal
#0C1793
ΔE00 5.58
Indigo Blue
#3A18B1
ΔE00 5.60
Midnight Blue
#191970
ΔE00 6.62
Cobalt Blue
#030AA7
ΔE00 6.87
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#40218B #6C8B21
analogous
#21378B #40218B #75218B
triadic
#40218B #8B4021 #218B40
tetradic
#40218B #8B2137 #6C8B21 #218B75
square
#40218B #8B2137 #6C8B21 #218B75
split-complementary
#40218B #8B7521 #378B21
monochromatic
#120A28 #29155A #40218B #572DBC #7851D6
Accessibility & contrast
On white
11.61
#40218B on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.81
#40218B on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #40218B
11.61:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##40218B | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##40218B | 1.00 | 11.61 | 1.81 | 11.61 |
| #FFFFFF | 11.61 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.81 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 11.61 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003B8E
Deuteranopia (green-blind)
#003689
Tritanopia (blue-blind)
#233E54
Achromatopsia (no color)
#393939
Design tokens & code
CSS
--color: #40218b; /* rgb */ color: rgb(64, 33, 139); /* oklch */ color: oklch(36.2% 0.163 288.9);
Tailwind
colors: {
custom: {
50: '#7d60ae',
500: '#40218b',
950: '#000000',
},
}SCSS
$custom: #40218b; $custom-light: #7d60ae; $custom-dark: #000000;
JSON
{
"hex": "#40218b",
"rgb": {
"r": 64,
"g": 33,
"b": 139
},
"hsl": {
"h": 257.547,
"s": 61.628,
"l": 33.725
},
"oklch": {
"l": 0.36152,
"c": 0.16263,
"h": 288.9
},
"luminance": 0.04042
}Semantic roles & 50–950 ramp
primary
#40218B
secondary
#9AB94F
accent
#E543B5
background
#F8F5FA
surface
#EFEAF4
border
#CAC6CE
text
#0B0510
muted
#7C797F