#40218C#40218C
#40218C is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.2% C 0.164 H 288.6°. Best body text is #FFFFFF at 11.58:1 contrast (WCAG AA passes).
Color values
| HEX | #40218C |
|---|---|
| RGB | rgb(64, 33, 140) |
| HSL | hsl(257, 62%, 34%) |
| HSV | hsv(257, 76%, 55%) |
| CMYK | cmyk(54.3%, 76.4%, 0%, 45.1%) |
| CIE-LAB | lab(23.90, 41.41, -54.00) |
| CIE-LCH | lch(23.90, 68.05, 307.48°) |
| OKLab | oklab(36.25% 0.0524 -0.1552) |
| OKLCH | oklch(36.25% 0.164 288.6) |
| XYZ | xyz(7.3904, 4.0708, 25.2022) |
| Luminance | 0.0407 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Indigo (survey)
#380282
ΔE00 4.98
Indigo
#4B0082
ΔE00 5.28
Indigo Blue
#3A18B1
ΔE00 5.45
Royal
#0C1793
ΔE00 5.52
Midnight Blue
#191970
ΔE00 6.70
Cobalt Blue
#030AA7
ΔE00 6.76
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#40218C #6D8C21
analogous
#21388C #40218C #76218C
triadic
#40218C #8C4021 #218C40
tetradic
#40218C #8C2138 #6D8C21 #218C76
square
#40218C #8C2138 #6D8C21 #218C76
split-complementary
#40218C #8C7621 #388C21
monochromatic
#130A29 #29155A #40218C #572DBE #7851D6
Accessibility & contrast
On white
11.58
#40218C on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.81
#40218C on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #40218C
11.58:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##40218C | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##40218C | 1.00 | 11.58 | 1.81 | 11.58 |
| #FFFFFF | 11.58 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.81 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 11.58 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003B8F
Deuteranopia (green-blind)
#00368A
Tritanopia (blue-blind)
#223E55
Achromatopsia (no color)
#393939
Design tokens & code
CSS
--color: #40218c; /* rgb */ color: rgb(64, 33, 140); /* oklch */ color: oklch(36.2% 0.164 288.6);
Tailwind
colors: {
custom: {
50: '#7e60af',
500: '#40218c',
950: '#000000',
},
}SCSS
$custom: #40218c; $custom-light: #7e60af; $custom-dark: #000000;
JSON
{
"hex": "#40218c",
"rgb": {
"r": 64,
"g": 33,
"b": 140
},
"hsl": {
"h": 257.383,
"s": 61.85,
"l": 33.922
},
"oklch": {
"l": 0.36249,
"c": 0.16384,
"h": 288.6
},
"luminance": 0.04071
}Semantic roles & 50–950 ramp
primary
#40218C
secondary
#9BB94F
accent
#E543B6
background
#F8F5FA
surface
#EFEAF5
border
#CAC6CF
text
#0B0510
muted
#7C797F