#40166C#40166C
#40166C is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.9% C 0.139 H 300.8°. Best body text is #FFFFFF at 13.55:1 contrast (WCAG AA passes).
Color values
| HEX | #40166C |
|---|---|
| RGB | rgb(64, 22, 108) |
| HSL | hsl(269, 66%, 25%) |
| HSV | hsv(269, 80%, 42%) |
| CMYK | cmyk(40.7%, 79.6%, 0%, 57.6%) |
| CIE-LAB | lab(19.00, 37.82, -41.66) |
| CIE-LCH | lch(19.00, 56.27, 312.23°) |
| OKLab | oklab(31.88% 0.071 -0.119) |
| OKLCH | oklch(31.88% 0.139 300.8) |
| XYZ | xyz(5.1074, 2.7465, 14.4455) |
| Luminance | 0.0275 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Royal Purple (survey)
#4B006E
ΔE00 3.59
Indigo
#4B0082
ΔE00 4.71
Indigo (survey)
#380282
ΔE00 5.25
Dark Indigo
#1F0954
ΔE00 6.48
Midnight Blue
#191970
ΔE00 6.80
Dark Royal Blue
#02066F
ΔE00 8.11
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#40166C #426C16
analogous
#16176C #40166C #6B166C
triadic
#40166C #6C4016 #166C40
tetradic
#40166C #6C1617 #426C16 #166C6B
square
#40166C #6C1617 #426C16 #166C6B
split-complementary
#40166C #6C6B16 #176C16
monochromatic
#0F0519 #220C39 #40166C #5E209F #7C2BD2
Accessibility & contrast
On white
13.55
#40166C on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.55
#40166C on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #40166C
13.55:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##40166C | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##40166C | 1.00 | 13.55 | 1.55 | 13.55 |
| #FFFFFF | 13.55 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.55 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 13.55 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#002E6E
Deuteranopia (green-blind)
#002E6A
Tritanopia (blue-blind)
#362C40
Achromatopsia (no color)
#2E2E2E
Design tokens & code
CSS
--color: #40166c; /* rgb */ color: rgb(64, 22, 108); /* oklch */ color: oklch(31.9% 0.139 300.8);
Tailwind
colors: {
custom: {
50: '#7a5897',
500: '#40166c',
950: '#000000',
},
}SCSS
$custom: #40166c; $custom-light: #7a5897; $custom-dark: #000000;
JSON
{
"hex": "#40166c",
"rgb": {
"r": 64,
"g": 22,
"b": 108
},
"hsl": {
"h": 269.302,
"s": 66.154,
"l": 25.49
},
"oklch": {
"l": 0.31879,
"c": 0.13854,
"h": 300.8
},
"luminance": 0.02747
}Semantic roles & 50–950 ramp
primary
#40166C
secondary
#70A23C
accent
#E93F96
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040D
muted
#7C797E