#40238F#40238F
#40238F is a dark, vivid violet. Relative luminance 0.043; OKLCH L 36.8% C 0.165 H 287.6°. Best body text is #FFFFFF at 11.32:1 contrast (WCAG AA passes).
Color values
| HEX | #40238F |
|---|---|
| RGB | rgb(64, 35, 143) |
| HSL | hsl(256, 61%, 35%) |
| HSV | hsv(256, 76%, 56%) |
| CMYK | cmyk(55.2%, 75.5%, 0%, 43.9%) |
| CIE-LAB | lab(24.56, 41.26, -54.79) |
| CIE-LCH | lch(24.56, 68.58, 306.98°) |
| OKLab | oklab(36.8% 0.0499 -0.1576) |
| OKLCH | oklch(36.8% 0.165 287.6) |
| XYZ | xyz(7.6718, 4.2748, 26.4022) |
| Luminance | 0.0428 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Indigo Blue
#3A18B1
ΔE00 5.12
Indigo (survey)
#380282
ΔE00 5.50
Royal
#0C1793
ΔE00 5.52
Indigo
#4B0082
ΔE00 5.81
Cobalt Blue
#030AA7
ΔE00 6.71
Ultramarine
#2000B1
ΔE00 6.88
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#40238F #728F23
analogous
#233C8F #40238F #76238F
triadic
#40238F #8F4023 #238F40
tetradic
#40238F #8F233C #728F23 #238F76
square
#40238F #8F233C #728F23 #238F76
split-complementary
#40238F #8F7623 #3C8F23
monochromatic
#140B2D #2A175E #40238F #562FC0 #7957D6
Accessibility & contrast
On white
11.32
#40238F on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.86
#40238F on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #40238F
11.32:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##40238F | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##40238F | 1.00 | 11.32 | 1.86 | 11.32 |
| #FFFFFF | 11.32 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.86 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 11.32 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003D92
Deuteranopia (green-blind)
#00378D
Tritanopia (blue-blind)
#1F4157
Achromatopsia (no color)
#3A3A3A
Design tokens & code
CSS
--color: #40238f; /* rgb */ color: rgb(64, 35, 143); /* oklch */ color: oklch(36.8% 0.165 287.6);
Tailwind
colors: {
custom: {
50: '#7e61b1',
500: '#40238f',
950: '#000000',
},
}SCSS
$custom: #40238f; $custom-light: #7e61b1; $custom-dark: #000000;
JSON
{
"hex": "#40238f",
"rgb": {
"r": 64,
"g": 35,
"b": 143
},
"hsl": {
"h": 256.111,
"s": 60.674,
"l": 34.902
},
"oklch": {
"l": 0.36799,
"c": 0.16529,
"h": 287.6
},
"luminance": 0.04275
}Semantic roles & 50–950 ramp
primary
#40238F
secondary
#9FBA54
accent
#E444B9
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980