#2A157F#2A157F
#2A157F is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.3% C 0.162 H 280.5°. Best body text is #FFFFFF at 13.89:1 contrast (WCAG AA passes).
Color values
| HEX | #2A157F |
|---|---|
| RGB | rgb(42, 21, 127) |
| HSL | hsl(252, 72%, 29%) |
| HSV | hsv(252, 83%, 50%) |
| CMYK | cmyk(66.9%, 83.5%, 0%, 50.2%) |
| CIE-LAB | lab(18.19, 40.63, -55.31) |
| CIE-LCH | lch(18.19, 68.63, 306.30°) |
| OKLab | oklab(31.31% 0.0297 -0.1596) |
| OKLCH | oklch(31.31% 0.162 280.5) |
| XYZ | xyz(5.0526, 2.5605, 20.3025) |
| Luminance | 0.0256 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Indigo (survey)
#380282
ΔE00 3.33
Midnight Blue
#191970
ΔE00 3.55
Royal
#0C1793
ΔE00 3.70
Navy
#000080
ΔE00 4.37
Darkblue
#00008B
ΔE00 4.37
Deep Blue
#040273
ΔE00 4.64
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#2A157F #6A7F15
analogous
#15357F #2A157F #5F157F
triadic
#2A157F #7F2A15 #157F2A
tetradic
#2A157F #7F1535 #6A7F15 #157F5F
square
#2A157F #7F1535 #6A7F15 #157F5F
split-complementary
#2A157F #7F5F15 #357F15
monochromatic
#09041A #190C4A #2A157F #3B1EB4 #5331DD
Accessibility & contrast
On white
13.89
#2A157F on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.51
#2A157F on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #2A157F
13.89:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##2A157F | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##2A157F | 1.00 | 13.89 | 1.51 | 13.89 |
| #FFFFFF | 13.89 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.51 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 13.89 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#003082
Deuteranopia (green-blind)
#00287D
Tritanopia (blue-blind)
#00364B
Achromatopsia (no color)
#2C2C2C
Design tokens & code
CSS
--color: #2a157f; /* rgb */ color: rgb(42, 21, 127); /* oklch */ color: oklch(31.3% 0.162 280.5);
Tailwind
colors: {
custom: {
50: '#7157a5',
500: '#2a157f',
950: '#000000',
},
}SCSS
$custom: #2a157f; $custom-light: #7157a5; $custom-dark: #000000;
JSON
{
"hex": "#2a157f",
"rgb": {
"r": 42,
"g": 21,
"b": 127
},
"hsl": {
"h": 251.887,
"s": 71.622,
"l": 29.02
},
"oklch": {
"l": 0.31306,
"c": 0.16239,
"h": 280.5
},
"luminance": 0.02561
}Semantic roles & 50–950 ramp
primary
#2A157F
secondary
#9CB43C
accent
#EE39CB
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F