#40218F#40218F
#40218F is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.5% C 0.167 H 287.9°. Best body text is #FFFFFF at 11.46:1 contrast (WCAG AA passes).
Color values
| HEX | #40218F |
|---|---|
| RGB | rgb(64, 33, 143) |
| HSL | hsl(257, 63%, 35%) |
| HSV | hsv(257, 77%, 56%) |
| CMYK | cmyk(55.2%, 76.9%, 0%, 43.9%) |
| CIE-LAB | lab(24.20, 42.29, -55.38) |
| CIE-LCH | lch(24.20, 69.69, 307.37°) |
| OKLab | oklab(36.54% 0.0516 -0.1593) |
| OKLCH | oklch(36.54% 0.167 287.9) |
| XYZ | xyz(7.6147, 4.1605, 26.3831) |
| Luminance | 0.0416 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Indigo Blue
#3A18B1
ΔE00 4.99
Indigo (survey)
#380282
ΔE00 5.10
Royal
#0C1793
ΔE00 5.38
Indigo
#4B0082
ΔE00 5.44
Cobalt Blue
#030AA7
ΔE00 6.47
Ultramarine
#2000B1
ΔE00 6.62
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#40218F #708F21
analogous
#21398F #40218F #77218F
triadic
#40218F #8F4021 #218F40
tetradic
#40218F #8F2139 #708F21 #218F77
square
#40218F #8F2139 #708F21 #218F77
split-complementary
#40218F #8F7721 #398F21
monochromatic
#130A2C #2A165D #40218F #562CC1 #7853D7
Accessibility & contrast
On white
11.46
#40218F on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.83
#40218F on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #40218F
11.46:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##40218F | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##40218F | 1.00 | 11.46 | 1.83 | 11.46 |
| #FFFFFF | 11.46 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.83 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 11.46 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003C92
Deuteranopia (green-blind)
#00378D
Tritanopia (blue-blind)
#204057
Achromatopsia (no color)
#393939
Design tokens & code
CSS
--color: #40218f; /* rgb */ color: rgb(64, 33, 143); /* oklch */ color: oklch(36.5% 0.167 287.9);
Tailwind
colors: {
custom: {
50: '#7e60b1',
500: '#40218f',
950: '#000000',
},
}SCSS
$custom: #40218f; $custom-light: #7e60b1; $custom-dark: #000000;
JSON
{
"hex": "#40218f",
"rgb": {
"r": 64,
"g": 33,
"b": 143
},
"hsl": {
"h": 256.909,
"s": 62.5,
"l": 34.51
},
"oklch": {
"l": 0.36542,
"c": 0.16745,
"h": 287.9
},
"luminance": 0.04161
}Semantic roles & 50–950 ramp
primary
#40218F
secondary
#9DBB51
accent
#E642B8
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980