#40236F#40236F
#40236F is a dark, vivid violet. Relative luminance 0.034; OKLCH L 33.9% C 0.125 H 296.7°. Best body text is #FFFFFF at 12.44:1 contrast (WCAG AA passes).
Color values
| HEX | #40236F |
|---|---|
| RGB | rgb(64, 35, 111) |
| HSL | hsl(263, 52%, 29%) |
| HSV | hsv(263, 68%, 44%) |
| CMYK | cmyk(42.3%, 68.5%, 0%, 56.5%) |
| CIE-LAB | lab(21.72, 31.77, -39.17) |
| CIE-LCH | lch(21.72, 50.43, 309.04°) |
| OKLab | oklab(33.9% 0.0562 -0.1117) |
| OKLCH | oklch(33.9% 0.125 296.7) |
| XYZ | xyz(5.5839, 3.4396, 15.4056) |
| Luminance | 0.0344 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Royal Purple (survey)
#4B006E
ΔE00 6.34
Midnight Blue
#191970
ΔE00 6.61
Indigo
#4B0082
ΔE00 6.73
Indigo (survey)
#380282
ΔE00 7.07
Dark Indigo
#1F0954
ΔE00 7.81
Darkslateblue
#483D8B
ΔE00 8.05
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#40236F #526F23
analogous
#232C6F #40236F #66236F
triadic
#40236F #6F4023 #236F40
tetradic
#40236F #6F232C #526F23 #236F66
square
#40236F #6F232C #526F23 #236F66
split-complementary
#40236F #6F6623 #2C6F23
monochromatic
#0D0717 #251440 #40236F #5B329E #7747C5
Accessibility & contrast
On white
12.44
#40236F on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.69
#40236F on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #40236F
12.44:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##40236F | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##40236F | 1.00 | 12.44 | 1.69 | 12.44 |
| #FFFFFF | 12.44 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.69 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 12.44 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003471
Deuteranopia (green-blind)
#00336D
Tritanopia (blue-blind)
#343545
Achromatopsia (no color)
#343434
Design tokens & code
CSS
--color: #40236f; /* rgb */ color: rgb(64, 35, 111); /* oklch */ color: oklch(33.9% 0.125 296.7);
Tailwind
colors: {
custom: {
50: '#796099',
500: '#40236f',
950: '#000000',
},
}SCSS
$custom: #40236f; $custom-light: #796099; $custom-dark: #000000;
JSON
{
"hex": "#40236f",
"rgb": {
"r": 64,
"g": 35,
"b": 111
},
"hsl": {
"h": 262.895,
"s": 52.055,
"l": 28.627
},
"oklch": {
"l": 0.33901,
"c": 0.12505,
"h": 296.7
},
"luminance": 0.0344
}Semantic roles & 50–950 ramp
primary
#40236F
secondary
#81A24C
accent
#DB4CA5
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#09050E
muted
#7B797E