#2A1371#2A1371

#2A1371 is a dark, vivid violet. Relative luminance 0.021; OKLCH L 29.5% C 0.147 H 284.0°. Best body text is #FFFFFF at 14.69:1 contrast (WCAG AA passes).

Color values

HEX#2A1371
RGBrgb(42, 19, 113)
HSLhsl(255, 71%, 26%)
HSVhsv(255, 83%, 44%)
CMYKcmyk(62.8%, 83.2%, 0%, 55.7%)
CIE-LABlab(16.26, 37.28, -49.52)
CIE-LCHlch(16.26, 61.98, 306.97°)
OKLaboklab(29.49% 0.0356 -0.1427)
OKLCHoklch(29.49% 0.147 284)
XYZxyz(4.1674, 2.1500, 15.8150)
Luminance0.0215 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1371 #5A7113
analogous
#132B71 #2A1371 #591371
triadic
#2A1371 #712A13 #13712A
tetradic
#2A1371 #71132B #5A7113 #137159
square
#2A1371 #71132B #5A7113 #137159
split-complementary
#2A1371 #715913 #2B7113
monochromatic
#0A041A #170A3D #2A1371 #3D1CA5 #5125DA

Accessibility & contrast

On white

14.69
#2A1371 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#2A1371 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1371
14.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1371#FFFFFF#000000##FFFFFF
##2A13711.0014.691.4314.69
#FFFFFF14.691.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B74
Deuteranopia (green-blind)
#00256F
Tritanopia (blue-blind)
#002F42
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #2a1371;
/* rgb */ color: rgb(42, 19, 113);
/* oklch */ color: oklch(29.5% 0.147 284.0);
Tailwind
colors: {
  custom: {
    50: '#6e559b',
    500: '#2a1371',
    950: '#000000',
  },
}
SCSS
$custom: #2a1371;
$custom-light: #6e559b;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1371",
  "rgb": {
    "r": 42,
    "g": 19,
    "b": 113
  },
  "hsl": {
    "h": 254.681,
    "s": 71.212,
    "l": 25.882
  },
  "oklch": {
    "l": 0.29491,
    "c": 0.14711,
    "h": 284
  },
  "luminance": 0.0215
}

Semantic roles & 50–950 ramp

primary
#2A1371
secondary
#8CA838
accent
#EE3AC2
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2A1371

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

Preview Lab → · Contrast checker → · Palette generator →

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