#2F157C#2F157C
#2F157C is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.4% C 0.158 H 284.2°. Best body text is #FFFFFF at 13.82:1 contrast (WCAG AA passes).
Color values
| HEX | #2F157C |
|---|---|
| RGB | rgb(47, 21, 124) |
| HSL | hsl(255, 71%, 28%) |
| HSV | hsv(255, 83%, 49%) |
| CMYK | cmyk(62.1%, 83.1%, 0%, 51.4%) |
| CIE-LAB | lab(18.35, 40.27, -53.13) |
| CIE-LCH | lch(18.35, 66.66, 307.16°) |
| OKLab | oklab(31.43% 0.0388 -0.1531) |
| OKLCH | oklch(31.43% 0.158 284.2) |
| XYZ | xyz(5.0774, 2.5956, 19.2983) |
| Luminance | 0.0260 (WCAG relative) |
| Temperature | cool |
| Family | violet |
Closest named colors
Indigo (survey)
#380282
ΔE00 3.05
Midnight Blue
#191970
ΔE00 3.78
Royal
#0C1793
ΔE00 4.53
Navy
#000080
ΔE00 4.90
Deep Blue
#040273
ΔE00 4.98
Dark Royal Blue
#02066F
ΔE00 4.99
Perceptual scales
Shades
Tints
Tones
OKLCH scale
Color harmonies
complementary
#2F157C #627C15
analogous
#152E7C #2F157C #62157C
triadic
#2F157C #7C2F15 #157C2F
tetradic
#2F157C #7C152E #627C15 #157C62
square
#2F157C #7C152E #627C15 #157C62
split-complementary
#2F157C #7C6215 #2E7C15
monochromatic
#0A041A #1B0C48 #2F157C #431EB0 #5B30DC
Accessibility & contrast
On white
13.82
#2F157C on #FFFFFF
AA ✓AA large ✓AAA ✓
On black
1.52
#2F157C on #000000
AA ✗AA large ✗AAA ✗
Best text color
#FFFFFF on #2F157C
13.82:1 — WCAG AA (normal text) passes
Contrast matrix
| fg \ bg | ##2F157C | #FFFFFF | #000000 | ##FFFFFF |
|---|---|---|---|---|
| ##2F157C | 1.00 | 13.82 | 1.52 | 13.82 |
| #FFFFFF | 13.82 | 1.00 | 21.00 | 1.00 |
| #000000 | 1.52 | 21.00 | 1.00 | 21.00 |
| ##FFFFFF | 13.82 | 1.00 | 21.00 | 1.00 |
Color blindness preview
Protanopia (red-blind)
#00307F
Deuteranopia (green-blind)
#00297A
Tritanopia (blue-blind)
#003449
Achromatopsia (no color)
#2D2D2D
Design tokens & code
CSS
--color: #2f157c; /* rgb */ color: rgb(47, 21, 124); /* oklch */ color: oklch(31.4% 0.158 284.2);
Tailwind
colors: {
custom: {
50: '#7357a3',
500: '#2f157c',
950: '#000000',
},
}SCSS
$custom: #2f157c; $custom-light: #7357a3; $custom-dark: #000000;
JSON
{
"hex": "#2f157c",
"rgb": {
"r": 47,
"g": 21,
"b": 124
},
"hsl": {
"h": 255.146,
"s": 71.034,
"l": 28.431
},
"oklch": {
"l": 0.31434,
"c": 0.15798,
"h": 284.2
},
"luminance": 0.02596
}Semantic roles & 50–950 ramp
primary
#2F157C
secondary
#94B13C
accent
#EE3AC0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F