#2F157B#2F157B
#2F157B is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.3% C 0.157 H 284.5°. Best body text is #FFFFFF at 13.87:1 contrast (WCAG AA passes).
Color values
| HEX | #2F157B |
|---|---|
| RGB | rgb(47, 21, 123) |
| HSL | hsl(255, 71%, 28%) |
| HSV | hsv(255, 83%, 48%) |
| CMYK | cmyk(61.8%, 82.9%, 0%, 51.8%) |
| CIE-LAB | lab(18.23, 39.97, -52.67) |
| CIE-LCH | lch(18.23, 66.12, 307.19°) |
| OKLab | oklab(31.32% 0.0391 -0.1518) |
| OKLCH | oklch(31.32% 0.157 284.5) |
| XYZ | xyz(5.0145, 2.5704, 18.9669) |
| Luminance | 0.0257 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Indigo (survey)
#380282
ΔE00 3.10
Midnight Blue
#191970
ΔE00 3.72
Royal
#0C1793
ΔE00 4.66
Navy
#000080
ΔE00 4.94
Dark Royal Blue
#02066F
ΔE00 4.95
Deep Blue
#040273
ΔE00 4.97
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#2F157B #617B15
analogous
#152E7B #2F157B #62157B
triadic
#2F157B #7B2F15 #157B2F
tetradic
#2F157B #7B152E #617B15 #157B62
square
#2F157B #7B152E #617B15 #157B62
split-complementary
#2F157B #7B6215 #2E7B15
monochromatic
#0A041A #1B0C47 #2F157B #431EAF #5B2FDB
Accessibility & contrast
On white
13.87
#2F157B on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.51
#2F157B on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #2F157B
13.87:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##2F157B | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##2F157B | 1.00 | 13.87 | 1.51 | 13.87 |
| #FFFFFF | 13.87 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.51 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 13.87 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#002F7E
Deuteranopia (green-blind)
#002979
Tritanopia (blue-blind)
#003448
Achromatopsia (no color)
#2C2C2C
Design tokens & code
CSS
--color: #2f157b; /* rgb */ color: rgb(47, 21, 123); /* oklch */ color: oklch(31.3% 0.157 284.5);
Tailwind
colors: {
custom: {
50: '#7257a2',
500: '#2f157b',
950: '#000000',
},
}SCSS
$custom: #2f157b; $custom-light: #7257a2; $custom-dark: #000000;
JSON
{
"hex": "#2f157b",
"rgb": {
"r": 47,
"g": 21,
"b": 123
},
"hsl": {
"h": 255.294,
"s": 70.833,
"l": 28.235
},
"oklch": {
"l": 0.31324,
"c": 0.15678,
"h": 284.5
},
"luminance": 0.02571
}Semantic roles & 50–950 ramp
primary
#2F157B
secondary
#93B03B
accent
#EE3AC0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F