#2B1871#2B1871

#2B1871 is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.2% C 0.142 H 283.7°. Best body text is #FFFFFF at 14.27:1 contrast (WCAG AA passes).

Color values

HEX#2B1871
RGBrgb(43, 24, 113)
HSLhsl(253, 65%, 27%)
HSVhsv(253, 79%, 44%)
CMYKcmyk(61.9%, 78.8%, 0%, 55.7%)
CIE-LABlab(17.27, 34.80, -47.85)
CIE-LCHlch(17.27, 59.17, 306.03°)
OKLaboklab(30.22% 0.0337 -0.1379)
OKLCHoklch(30.22% 0.142 283.7)
XYZxyz(4.3026, 2.3588, 15.8482)
Luminance0.0236 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2B1871 #5E7118
analogous
#183271 #2B1871 #581871
triadic
#2B1871 #712B18 #18712B
tetradic
#2B1871 #711832 #5E7118 #187158
square
#2B1871 #711832 #5E7118 #187158
split-complementary
#2B1871 #715818 #327118
monochromatic
#0A0519 #180D3F #2B1871 #3E23A3 #5330D3

Accessibility & contrast

On white

14.27
#2B1871 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#2B1871 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2B1871
14.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2B1871#FFFFFF#000000##FFFFFF
##2B18711.0014.271.4714.27
#FFFFFF14.271.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D74
Deuteranopia (green-blind)
#00276F
Tritanopia (blue-blind)
#003143
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #2b1871;
/* rgb */ color: rgb(43, 24, 113);
/* oklch */ color: oklch(30.2% 0.142 283.7);
Tailwind
colors: {
  custom: {
    50: '#6e579b',
    500: '#2b1871',
    950: '#000000',
  },
}
SCSS
$custom: #2b1871;
$custom-light: #6e579b;
$custom-dark: #000000;
JSON
{
  "hex": "#2b1871",
  "rgb": {
    "r": 43,
    "g": 24,
    "b": 113
  },
  "hsl": {
    "h": 252.809,
    "s": 64.964,
    "l": 26.863
  },
  "oklch": {
    "l": 0.30224,
    "c": 0.14195,
    "h": 283.7
  },
  "luminance": 0.02359
}

Semantic roles & 50–950 ramp

primary
#2B1871
secondary
#90A63E
accent
#E840C4
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2B1871

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

Preview Lab → · Contrast checker → · Palette generator →

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