#40238E#40238E
#40238E is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.7% C 0.164 H 287.8°. Best body text is #FFFFFF at 11.36:1 contrast (WCAG AA passes).
Color values
| HEX | #40238E |
|---|---|
| RGB | rgb(64, 35, 142) |
| HSL | hsl(256, 60%, 35%) |
| HSV | hsv(256, 75%, 56%) |
| CMYK | cmyk(54.9%, 75.4%, 0%, 44.3%) |
| CIE-LAB | lab(24.46, 40.96, -54.32) |
| CIE-LCH | lch(24.46, 68.03, 307.02°) |
| OKLab | oklab(36.7% 0.0502 -0.1562) |
| OKLCH | oklch(36.7% 0.164 287.8) |
| XYZ | xyz(7.5964, 4.2447, 26.0050) |
| Luminance | 0.0425 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Indigo Blue
#3A18B1
ΔE00 5.27
Indigo (survey)
#380282
ΔE00 5.46
Royal
#0C1793
ΔE00 5.57
Indigo
#4B0082
ΔE00 5.76
Cobalt Blue
#030AA7
ΔE00 6.80
Midnight Blue
#191970
ΔE00 6.90
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#40238E #718E23
analogous
#233B8E #40238E #76238E
triadic
#40238E #8E4023 #238E40
tetradic
#40238E #8E233B #718E23 #238E76
square
#40238E #8E233B #718E23 #238E76
split-complementary
#40238E #8E7623 #3B8E23
monochromatic
#140B2C #2A175D #40238E #562FBF #7956D5
Accessibility & contrast
On white
11.36
#40238E on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.85
#40238E on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #40238E
11.36:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##40238E | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##40238E | 1.00 | 11.36 | 1.85 | 11.36 |
| #FFFFFF | 11.36 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.85 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 11.36 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003D91
Deuteranopia (green-blind)
#00378C
Tritanopia (blue-blind)
#204056
Achromatopsia (no color)
#3A3A3A
Design tokens & code
CSS
--color: #40238e; /* rgb */ color: rgb(64, 35, 142); /* oklch */ color: oklch(36.7% 0.164 287.8);
Tailwind
colors: {
custom: {
50: '#7e61b0',
500: '#40238e',
950: '#000000',
},
}SCSS
$custom: #40238e; $custom-light: #7e61b0; $custom-dark: #000000;
JSON
{
"hex": "#40238e",
"rgb": {
"r": 64,
"g": 35,
"b": 142
},
"hsl": {
"h": 256.262,
"s": 60.452,
"l": 34.706
},
"oklch": {
"l": 0.36703,
"c": 0.16407,
"h": 287.8
},
"luminance": 0.04245
}Semantic roles & 50–950 ramp
primary
#40238E
secondary
#9EB953
accent
#E444B8
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980