#2B1171#2B1171

#2B1171 is a dark, vivid violet. Relative luminance 0.021; OKLCH L 29.4% C 0.149 H 285.0°. Best body text is #FFFFFF at 14.77:1 contrast (WCAG AA passes).

Color values

HEX#2B1171
RGBrgb(43, 17, 113)
HSLhsl(256, 74%, 25%)
HSVhsv(256, 85%, 44%)
CMYKcmyk(61.9%, 85%, 0%, 55.7%)
CIE-LABlab(16.04, 38.35, -49.88)
CIE-LCHlch(16.04, 62.92, 307.56°)
OKLaboklab(29.37% 0.0385 -0.1437)
OKLCHoklch(29.37% 0.149 285)
XYZxyz(4.1764, 2.1065, 15.8061)
Luminance0.0211 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2B1171 #577111
analogous
#112771 #2B1171 #5B1171
triadic
#2B1171 #712B11 #11712B
tetradic
#2B1171 #711127 #577111 #11715B
square
#2B1171 #711127 #577111 #11715B
split-complementary
#2B1171 #715B11 #277111
monochromatic
#0A041B #17093C #2B1171 #3F19A6 #5321DB

Accessibility & contrast

On white

14.77
#2B1171 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.42
#2B1171 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2B1171
14.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2B1171#FFFFFF#000000##FFFFFF
##2B11711.0014.771.4214.77
#FFFFFF14.771.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A74
Deuteranopia (green-blind)
#00256F
Tritanopia (blue-blind)
#012E42
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #2b1171;
/* rgb */ color: rgb(43, 17, 113);
/* oklch */ color: oklch(29.4% 0.149 285.0);
Tailwind
colors: {
  custom: {
    50: '#6f549b',
    500: '#2b1171',
    950: '#000000',
  },
}
SCSS
$custom: #2b1171;
$custom-light: #6f549b;
$custom-dark: #000000;
JSON
{
  "hex": "#2b1171",
  "rgb": {
    "r": 43,
    "g": 17,
    "b": 113
  },
  "hsl": {
    "h": 256.25,
    "s": 73.846,
    "l": 25.49
  },
  "oklch": {
    "l": 0.29366,
    "c": 0.14879,
    "h": 285
  },
  "luminance": 0.02107
}

Semantic roles & 50–950 ramp

primary
#2B1171
secondary
#89A836
accent
#F137BE
background
#F7F5F9
surface
#EDE8F2
border
#C8C4CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2B1171

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

Preview Lab → · Contrast checker → · Palette generator →

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