#40298C#40298C
#40298C is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.4% C 0.155 H 287.0°. Best body text is #FFFFFF at 10.97:1 contrast (WCAG AA passes).
Color values
| HEX | #40298C |
|---|---|
| RGB | rgb(64, 41, 140) |
| HSL | hsl(254, 55%, 35%) |
| HSV | hsv(254, 71%, 55%) |
| CMYK | cmyk(54.3%, 70.7%, 0%, 45.1%) |
| CIE-LAB | lab(25.47, 37.03, -51.43) |
| CIE-LCH | lch(25.47, 63.38, 305.75°) |
| OKLab | oklab(37.36% 0.0452 -0.1478) |
| OKLCH | oklch(37.36% 0.155 287) |
| XYZ | xyz(7.6395, 4.5689, 25.2852) |
| Luminance | 0.0457 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Darkslateblue
#483D8B
ΔE00 5.77
Indigo Blue
#3A18B1
ΔE00 6.20
Royal
#0C1793
ΔE00 6.33
Indigo (survey)
#380282
ΔE00 6.79
Blueberry
#464196
ΔE00 6.79
Indigo
#4B0082
ΔE00 7.02
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#40298C #758C29
analogous
#29448C #40298C #71298C
triadic
#40298C #8C4029 #298C40
tetradic
#40298C #8C2944 #758C29 #298C71
square
#40298C #8C2944 #758C29 #298C71
split-complementary
#40298C #8C7129 #448C29
monochromatic
#150D2D #2A1B5D #40298C #5637BB #795FD0
Accessibility & contrast
On white
10.97
#40298C on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.91
#40298C on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #40298C
10.97:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##40298C | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##40298C | 1.00 | 10.97 | 1.91 | 10.97 |
| #FFFFFF | 10.97 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.91 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 10.97 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003F8F
Deuteranopia (green-blind)
#003A8A
Tritanopia (blue-blind)
#224357
Achromatopsia (no color)
#3C3C3C
Design tokens & code
CSS
--color: #40298c; /* rgb */ color: rgb(64, 41, 140); /* oklch */ color: oklch(37.4% 0.155 287.0);
Tailwind
colors: {
custom: {
50: '#7d65ae',
500: '#40298c',
950: '#000000',
},
}SCSS
$custom: #40298c; $custom-light: #7d65ae; $custom-dark: #000000;
JSON
{
"hex": "#40298c",
"rgb": {
"r": 64,
"g": 41,
"b": 140
},
"hsl": {
"h": 253.939,
"s": 54.696,
"l": 35.49
},
"oklch": {
"l": 0.3736,
"c": 0.15454,
"h": 287
},
"luminance": 0.04569
}Semantic roles & 50–950 ramp
primary
#40298C
secondary
#A1B65B
accent
#DE4ABC
background
#F8F6FA
surface
#EFEBF4
border
#CAC6CE
text
#0A0610
muted
#7C7A7F