#402F8D#402F8D
#402F8D is a dark, vivid violet. Relative luminance 0.050; OKLCH L 38.4% C 0.148 H 285.3°. Best body text is #FFFFFF at 10.45:1 contrast (WCAG AA passes).
Color values
| HEX | #402F8D |
|---|---|
| RGB | rgb(64, 47, 141) |
| HSL | hsl(251, 50%, 37%) |
| HSV | hsv(251, 67%, 55%) |
| CMYK | cmyk(54.6%, 66.7%, 0%, 44.7%) |
| CIE-LAB | lab(26.86, 33.79, -49.78) |
| CIE-LCH | lch(26.86, 60.16, 304.17°) |
| OKLab | oklab(38.39% 0.0392 -0.1429) |
| OKLCH | oklch(38.39% 0.148 285.3) |
| XYZ | xyz(7.9371, 5.0457, 25.7498) |
| Luminance | 0.0505 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Darkslateblue
#483D8B
ΔE00 4.28
Blueberry
#464196
ΔE00 5.23
Sapphire (survey)
#2138AB
ΔE00 6.57
Indigo Blue
#3A18B1
ΔE00 7.02
Rebeccapurple
#663399
ΔE00 7.13
Royal
#0C1793
ΔE00 7.28
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#402F8D #7C8D2F
analogous
#2F4D8D #402F8D #6F2F8D
triadic
#402F8D #8D402F #2F8D40
tetradic
#402F8D #8D2F4D #7C8D2F #2F8D6F
square
#402F8D #8D2F4D #7C8D2F #2F8D6F
split-complementary
#402F8D #8D6F2F #4D8D2F
monochromatic
#161031 #2B205F #402F8D #553EBB #7B69CD
Accessibility & contrast
On white
10.45
#402F8D on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
2.01
#402F8D on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #402F8D
10.45:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##402F8D | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##402F8D | 1.00 | 10.45 | 2.01 | 10.45 |
| #FFFFFF | 10.45 | 1.00 | 21.00 | 1.00 |
| #000000 | 2.01 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 10.45 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#004290
Deuteranopia (green-blind)
#003D8B
Tritanopia (blue-blind)
#204659
Achromatopsia (no color)
#3F3F3F
Design tokens & code
CSS
--color: #402f8d; /* rgb */ color: rgb(64, 47, 141); /* oklch */ color: oklch(38.4% 0.148 285.3);
Tailwind
colors: {
custom: {
50: '#7d69af',
500: '#402f8d',
950: '#000000',
},
}SCSS
$custom: #402f8d; $custom-light: #7d69af; $custom-dark: #000000;
JSON
{
"hex": "#402f8d",
"rgb": {
"r": 64,
"g": 47,
"b": 141
},
"hsl": {
"h": 250.851,
"s": 50,
"l": 36.863
},
"oklch": {
"l": 0.38391,
"c": 0.14819,
"h": 285.3
},
"luminance": 0.05046
}Semantic roles & 50–950 ramp
primary
#402F8D
secondary
#A6B464
accent
#DA4EC0
background
#F8F6FA
surface
#EFEBF5
border
#CAC6CF
text
#0A0610
muted
#7C7A7F