#40228F#40228F
#40228F is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.7% C 0.166 H 287.8°. Best body text is #FFFFFF at 11.39:1 contrast (WCAG AA passes).
Color values
| HEX | #40228F |
|---|---|
| RGB | rgb(64, 34, 143) |
| HSL | hsl(257, 62%, 35%) |
| HSV | hsv(257, 76%, 56%) |
| CMYK | cmyk(55.2%, 76.2%, 0%, 43.9%) |
| CIE-LAB | lab(24.38, 41.78, -55.09) |
| CIE-LCH | lch(24.38, 69.14, 307.18°) |
| OKLab | oklab(36.67% 0.0508 -0.1584) |
| OKLCH | oklch(36.67% 0.166 287.8) |
| XYZ | xyz(7.6428, 4.2168, 26.3925) |
| Luminance | 0.0422 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Indigo Blue
#3A18B1
ΔE00 5.05
Indigo (survey)
#380282
ΔE00 5.29
Royal
#0C1793
ΔE00 5.45
Indigo
#4B0082
ΔE00 5.62
Cobalt Blue
#030AA7
ΔE00 6.58
Ultramarine
#2000B1
ΔE00 6.75
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#40228F #718F22
analogous
#223A8F #40228F #77228F
triadic
#40228F #8F4022 #228F40
tetradic
#40228F #8F223A #718F22 #228F77
square
#40228F #8F223A #718F22 #228F77
split-complementary
#40228F #8F7722 #3A8F22
monochromatic
#140A2C #2A165E #40228F #562EC0 #7955D7
Accessibility & contrast
On white
11.39
#40228F on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.84
#40228F on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #40228F
11.39:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##40228F | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##40228F | 1.00 | 11.39 | 1.84 | 11.39 |
| #FFFFFF | 11.39 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.84 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 11.39 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003C92
Deuteranopia (green-blind)
#00378D
Tritanopia (blue-blind)
#1F4057
Achromatopsia (no color)
#3A3A3A
Design tokens & code
CSS
--color: #40228f; /* rgb */ color: rgb(64, 34, 143); /* oklch */ color: oklch(36.7% 0.166 287.8);
Tailwind
colors: {
custom: {
50: '#7e61b1',
500: '#40228f',
950: '#000000',
},
}SCSS
$custom: #40228f; $custom-light: #7e61b1; $custom-dark: #000000;
JSON
{
"hex": "#40228f",
"rgb": {
"r": 64,
"g": 34,
"b": 143
},
"hsl": {
"h": 256.514,
"s": 61.582,
"l": 34.706
},
"oklch": {
"l": 0.36669,
"c": 0.16638,
"h": 287.8
},
"luminance": 0.04217
}Semantic roles & 50–950 ramp
primary
#40228F
secondary
#9EBA52
accent
#E543B8
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980