#2A1571#2A1571

#2A1571 is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.7% C 0.145 H 283.6°. Best body text is #FFFFFF at 14.54:1 contrast (WCAG AA passes).

Color values

HEX#2A1571
RGBrgb(42, 21, 113)
HSLhsl(254, 69%, 26%)
HSVhsv(254, 81%, 44%)
CMYKcmyk(62.8%, 81.4%, 0%, 55.7%)
CIE-LABlab(16.60, 36.27, -48.94)
CIE-LCHlch(16.60, 60.92, 306.54°)
OKLaboklab(29.73% 0.0342 -0.1411)
OKLCHoklch(29.73% 0.145 283.6)
XYZxyz(4.2027, 2.2205, 15.8267)
Luminance0.0222 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1571 #5C7115
analogous
#152E71 #2A1571 #581571
triadic
#2A1571 #712A15 #15712A
tetradic
#2A1571 #71152E #5C7115 #157158
square
#2A1571 #71152E #5C7115 #157158
split-complementary
#2A1571 #715815 #2E7115
monochromatic
#0A051A #170B3D #2A1571 #3D1FA5 #5129D7

Accessibility & contrast

On white

14.54
#2A1571 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.44
#2A1571 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1571
14.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1571#FFFFFF#000000##FFFFFF
##2A15711.0014.541.4414.54
#FFFFFF14.541.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C74
Deuteranopia (green-blind)
#00266F
Tritanopia (blue-blind)
#003043
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #2a1571;
/* rgb */ color: rgb(42, 21, 113);
/* oklch */ color: oklch(29.7% 0.145 283.6);
Tailwind
colors: {
  custom: {
    50: '#6e569b',
    500: '#2a1571',
    950: '#000000',
  },
}
SCSS
$custom: #2a1571;
$custom-light: #6e569b;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1571",
  "rgb": {
    "r": 42,
    "g": 21,
    "b": 113
  },
  "hsl": {
    "h": 253.696,
    "s": 68.657,
    "l": 26.275
  },
  "oklch": {
    "l": 0.29734,
    "c": 0.14519,
    "h": 283.6
  },
  "luminance": 0.02221
}

Semantic roles & 50–950 ramp

primary
#2A1571
secondary
#8EA73B
accent
#EB3CC4
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2A1571

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#2A1571 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva