#2A1878#2A1878
#2A1878 is a dark, vivid violet. Relative luminance 0.025; OKLCH L 30.9% C 0.151 H 281.5°. Best body text is #FFFFFF at 14.00:1 contrast (WCAG AA passes).
Color values
| HEX | #2A1878 |
|---|---|
| RGB | rgb(42, 24, 120) |
| HSL | hsl(251, 67%, 28%) |
| HSV | hsv(251, 80%, 47%) |
| CMYK | cmyk(65%, 80%, 0%, 52.9%) |
| CIE-LAB | lab(17.92, 36.91, -51.28) |
| CIE-LCH | lch(17.92, 63.19, 305.75°) |
| OKLab | oklab(30.89% 0.0301 -0.1479) |
| OKLCH | oklch(30.89% 0.151 281.5) |
| XYZ | xyz(4.6706, 2.5012, 18.0023) |
| Luminance | 0.0250 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Midnight Blue
#191970
ΔE00 2.63
Indigo (survey)
#380282
ΔE00 4.22
Royal
#0C1793
ΔE00 4.64
Dark Royal Blue
#02066F
ΔE00 4.71
Deep Blue
#040273
ΔE00 4.95
Navy
#000080
ΔE00 5.14
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#2A1878 #667818
analogous
#183678 #2A1878 #5A1878
triadic
#2A1878 #782A18 #18782A
tetradic
#2A1878 #781836 #667818 #18785A
square
#2A1878 #781836 #667818 #18785A
split-complementary
#2A1878 #785A18 #367818
monochromatic
#09051A #180E45 #2A1878 #3C22AB #5234D6
Accessibility & contrast
On white
14.00
#2A1878 on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.50
#2A1878 on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #2A1878
14.00:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##2A1878 | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##2A1878 | 1.00 | 14.00 | 1.50 | 14.00 |
| #FFFFFF | 14.00 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.50 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 14.00 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#002F7B
Deuteranopia (green-blind)
#002876
Tritanopia (blue-blind)
#003447
Achromatopsia (no color)
#2C2C2C
Design tokens & code
CSS
--color: #2a1878; /* rgb */ color: rgb(42, 24, 120); /* oklch */ color: oklch(30.9% 0.151 281.5);
Tailwind
colors: {
custom: {
50: '#6f58a0',
500: '#2a1878',
950: '#000000',
},
}SCSS
$custom: #2a1878; $custom-light: #6f58a0; $custom-dark: #000000;
JSON
{
"hex": "#2a1878",
"rgb": {
"r": 42,
"g": 24,
"b": 120
},
"hsl": {
"h": 251.25,
"s": 66.667,
"l": 28.235
},
"oklch": {
"l": 0.30886,
"c": 0.15098,
"h": 281.5
},
"luminance": 0.02502
}Semantic roles & 50–950 ramp
primary
#2A1878
secondary
#98AD3F
accent
#EA3EC9
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#08030F
muted
#7B787F