#2B1571#2B1571

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

Color values

HEX#2B1571
RGBrgb(43, 21, 113)
HSLhsl(254, 69%, 26%)
HSVhsv(254, 81%, 44%)
CMYKcmyk(61.9%, 81.4%, 0%, 55.7%)
CIE-LABlab(16.71, 36.40, -48.77)
CIE-LCHlch(16.71, 60.85, 306.74°)
OKLaboklab(29.83% 0.0359 -0.1405)
OKLCHoklch(29.83% 0.145 284.3)
XYZxyz(4.2441, 2.2419, 15.8287)
Luminance0.0224 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2B1571 #5B7115
analogous
#152D71 #2B1571 #591571
triadic
#2B1571 #712B15 #15712B
tetradic
#2B1571 #71152D #5B7115 #157159
square
#2B1571 #71152D #5B7115 #157159
split-complementary
#2B1571 #715915 #2D7115
monochromatic
#0A051A #170B3D #2B1571 #3F1FA5 #5329D7

Accessibility & contrast

On white

14.50
#2B1571 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#2B1571 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2B1571
14.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2B1571#FFFFFF#000000##FFFFFF
##2B15711.0014.501.4514.50
#FFFFFF14.501.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.501.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2b1571;
/* rgb */ color: rgb(43, 21, 113);
/* oklch */ color: oklch(29.8% 0.145 284.3);
Tailwind
colors: {
  custom: {
    50: '#6e569b',
    500: '#2b1571',
    950: '#000000',
  },
}
SCSS
$custom: #2b1571;
$custom-light: #6e569b;
$custom-dark: #000000;
JSON
{
  "hex": "#2b1571",
  "rgb": {
    "r": 43,
    "g": 21,
    "b": 113
  },
  "hsl": {
    "h": 254.348,
    "s": 68.657,
    "l": 26.275
  },
  "oklch": {
    "l": 0.29832,
    "c": 0.14506,
    "h": 284.3
  },
  "luminance": 0.02242
}

Semantic roles & 50–950 ramp

primary
#2B1571
secondary
#8DA73B
accent
#EB3CC2
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2B1571

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

Preview Lab → · Contrast checker → · Palette generator →

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