#402CA2#402CA2
#402CA2 is a dark, vivid violet. Relative luminance 0.055; OKLCH L 39.9% C 0.179 H 282.4°. Best body text is #FFFFFF at 10.00:1 contrast (WCAG AA passes).
Color values
| HEX | #402CA2 |
|---|---|
| RGB | rgb(64, 44, 162) |
| HSL | hsl(250, 57%, 40%) |
| HSV | hsv(250, 73%, 64%) |
| CMYK | cmyk(60.5%, 72.8%, 0%, 36.5%) |
| CIE-LAB | lab(28.11, 42.18, -60.60) |
| CIE-LCH | lch(28.11, 73.84, 304.84°) |
| OKLab | oklab(39.87% 0.0383 -0.1746) |
| OKLCH | oklch(39.87% 0.179 282.4) |
| XYZ | xyz(9.5346, 5.4993, 34.7345) |
| Luminance | 0.0550 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Indigo Blue
#3A18B1
ΔE00 4.16
Sapphire (survey)
#2138AB
ΔE00 5.37
Ocean Blue
#4F42B5
ΔE00 6.35
Blueberry
#464196
ΔE00 6.39
Darkslateblue
#483D8B
ΔE00 6.53
Royal
#0C1793
ΔE00 6.65
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#402CA2 #8EA22C
analogous
#2C53A2 #402CA2 #7B2CA2
triadic
#402CA2 #A2402C #2CA240
tetradic
#402CA2 #A22C53 #8EA22C #2CA27B
square
#402CA2 #A22C53 #8EA22C #2CA27B
split-complementary
#402CA2 #A27B2C #53A22C
monochromatic
#1A1242 #2D1F72 #402CA2 #5840CB #8270D8
Accessibility & contrast
On white
10.00
#402CA2 on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
2.10
#402CA2 on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #402CA2
10.00:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##402CA2 | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##402CA2 | 1.00 | 10.00 | 2.10 | 10.00 |
| #FFFFFF | 10.00 | 1.00 | 21.00 | 1.00 |
| #000000 | 2.10 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 10.00 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#0046A5
Deuteranopia (green-blind)
#003EA0
Tritanopia (blue-blind)
#004C64
Achromatopsia (no color)
#424242
Design tokens & code
CSS
--color: #402ca2; /* rgb */ color: rgb(64, 44, 162); /* oklch */ color: oklch(39.9% 0.179 282.4);
Tailwind
colors: {
custom: {
50: '#8167bf',
500: '#402ca2',
950: '#000000',
},
}SCSS
$custom: #402ca2; $custom-light: #8167bf; $custom-dark: #000000;
JSON
{
"hex": "#402ca2",
"rgb": {
"r": 64,
"g": 44,
"b": 162
},
"hsl": {
"h": 250.169,
"s": 57.282,
"l": 40.392
},
"oklch": {
"l": 0.39867,
"c": 0.1788,
"h": 282.4
},
"luminance": 0.055
}Semantic roles & 50–950 ramp
primary
#402CA2
secondary
#B1BF6A
accent
#E147C7
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0B0612
muted
#7C7A81