#40238C#40238C
#40238C is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.5% C 0.162 H 288.3°. Best body text is #FFFFFF at 11.43:1 contrast (WCAG AA passes).
Color values
| HEX | #40238C |
|---|---|
| RGB | rgb(64, 35, 140) |
| HSL | hsl(257, 60%, 34%) |
| HSV | hsv(257, 75%, 55%) |
| CMYK | cmyk(54.3%, 75%, 0%, 45.1%) |
| CIE-LAB | lab(24.27, 40.36, -53.39) |
| CIE-LCH | lch(24.27, 66.93, 307.09°) |
| OKLab | oklab(36.51% 0.0507 -0.1535) |
| OKLCH | oklch(36.51% 0.162 288.3) |
| XYZ | xyz(7.4476, 4.1851, 25.2212) |
| Luminance | 0.0419 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Indigo (survey)
#380282
ΔE00 5.39
Indigo Blue
#3A18B1
ΔE00 5.58
Royal
#0C1793
ΔE00 5.67
Indigo
#4B0082
ΔE00 5.68
Midnight Blue
#191970
ΔE00 6.74
Cobalt Blue
#030AA7
ΔE00 6.99
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#40238C #6F8C23
analogous
#233B8C #40238C #75238C
triadic
#40238C #8C4023 #238C40
tetradic
#40238C #8C233B #6F8C23 #238C75
square
#40238C #8C233B #6F8C23 #238C75
split-complementary
#40238C #8C7523 #3B8C23
monochromatic
#130B2A #2A175B #40238C #562FBD #7855D4
Accessibility & contrast
On white
11.43
#40238C on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.84
#40238C on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #40238C
11.43:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##40238C | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##40238C | 1.00 | 11.43 | 1.84 | 11.43 |
| #FFFFFF | 11.43 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.84 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 11.43 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003C8F
Deuteranopia (green-blind)
#00378A
Tritanopia (blue-blind)
#223F55
Achromatopsia (no color)
#3A3A3A
Design tokens & code
CSS
--color: #40238c; /* rgb */ color: rgb(64, 35, 140); /* oklch */ color: oklch(36.5% 0.162 288.3);
Tailwind
colors: {
custom: {
50: '#7d61af',
500: '#40238c',
950: '#000000',
},
}SCSS
$custom: #40238c; $custom-light: #7d61af; $custom-dark: #000000;
JSON
{
"hex": "#40238c",
"rgb": {
"r": 64,
"g": 35,
"b": 140
},
"hsl": {
"h": 256.571,
"s": 60,
"l": 34.314
},
"oklch": {
"l": 0.3651,
"c": 0.16163,
"h": 288.3
},
"luminance": 0.04186
}Semantic roles & 50–950 ramp
primary
#40238C
secondary
#9CB852
accent
#E345B7
background
#F8F5FA
surface
#EFEAF5
border
#CAC6CF
text
#0B0510
muted
#7C797F