#402D9F#402D9F
#402D9F is a dark, vivid violet. Relative luminance 0.055; OKLCH L 39.7% C 0.174 H 282.7°. Best body text is #FFFFFF at 10.03:1 contrast (WCAG AA passes).
Color values
| HEX | #402D9F |
|---|---|
| RGB | rgb(64, 45, 159) |
| HSL | hsl(250, 56%, 40%) |
| HSV | hsv(250, 72%, 62%) |
| CMYK | cmyk(59.7%, 71.7%, 0%, 37.6%) |
| CIE-LAB | lab(28.03, 40.68, -58.91) |
| CIE-LCH | lch(28.03, 71.59, 304.63°) |
| OKLab | oklab(39.72% 0.0382 -0.1697) |
| OKLCH | oklch(39.72% 0.174 282.7) |
| XYZ | xyz(9.3088, 5.4693, 33.3593) |
| Luminance | 0.0547 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Indigo Blue
#3A18B1
ΔE00 4.60
Sapphire (survey)
#2138AB
ΔE00 5.33
Blueberry
#464196
ΔE00 6.03
Darkslateblue
#483D8B
ΔE00 6.08
Ocean Blue
#4F42B5
ΔE00 6.36
Royal
#0C1793
ΔE00 6.70
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#402D9F #8C9F2D
analogous
#2D539F #402D9F #792D9F
triadic
#402D9F #9F402D #2D9F40
tetradic
#402D9F #9F2D53 #8C9F2D #2D9F79
square
#402D9F #9F2D53 #8C9F2D #2D9F79
split-complementary
#402D9F #9F792D #539F2D
monochromatic
#1A1240 #2D206F #402D9F #5740C9 #8170D6
Accessibility & contrast
On white
10.03
#402D9F on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
2.09
#402D9F on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #402D9F
10.03:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##402D9F | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##402D9F | 1.00 | 10.03 | 2.09 | 10.03 |
| #FFFFFF | 10.03 | 1.00 | 21.00 | 1.00 |
| #000000 | 2.09 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 10.03 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#0046A2
Deuteranopia (green-blind)
#003E9D
Tritanopia (blue-blind)
#014C63
Achromatopsia (no color)
#424242
Design tokens & code
CSS
--color: #402d9f; /* rgb */ color: rgb(64, 45, 159); /* oklch */ color: oklch(39.7% 0.174 282.7);
Tailwind
colors: {
custom: {
50: '#8068bc',
500: '#402d9f',
950: '#000000',
},
}SCSS
$custom: #402d9f; $custom-light: #8068bc; $custom-dark: #000000;
JSON
{
"hex": "#402d9f",
"rgb": {
"r": 64,
"g": 45,
"b": 159
},
"hsl": {
"h": 250,
"s": 55.882,
"l": 40
},
"oklch": {
"l": 0.39724,
"c": 0.17394,
"h": 282.7
},
"luminance": 0.0547
}Semantic roles & 50–950 ramp
primary
#402D9F
secondary
#B0BE6A
accent
#DF49C6
background
#F8F6FB
surface
#EFEBF7
border
#CAC6D0
text
#0B0612
muted
#7C7A81