#2A1871#2A1871

#2A1871 is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.1% C 0.142 H 283.1°. Best body text is #FFFFFF at 14.31:1 contrast (WCAG AA passes).

Color values

HEX#2A1871
RGBrgb(42, 24, 113)
HSLhsl(252, 65%, 27%)
HSVhsv(252, 79%, 44%)
CMYKcmyk(62.8%, 78.8%, 0%, 55.7%)
CIE-LABlab(17.17, 34.66, -48.02)
CIE-LCHlch(17.17, 59.22, 305.82°)
OKLaboklab(30.13% 0.0321 -0.1384)
OKLCHoklch(30.13% 0.142 283.1)
XYZxyz(4.2612, 2.3375, 15.8462)
Luminance0.0234 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1871 #5F7118
analogous
#183371 #2A1871 #571871
triadic
#2A1871 #712A18 #18712A
tetradic
#2A1871 #711833 #5F7118 #187157
square
#2A1871 #711833 #5F7118 #187157
split-complementary
#2A1871 #715718 #337118
monochromatic
#090519 #170D3F #2A1871 #3D23A3 #5130D3

Accessibility & contrast

On white

14.31
#2A1871 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2A1871
14.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1871#FFFFFF#000000##FFFFFF
##2A18711.0014.311.4714.31
#FFFFFF14.311.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.311.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: #2a1871;
/* rgb */ color: rgb(42, 24, 113);
/* oklch */ color: oklch(30.1% 0.142 283.1);
Tailwind
colors: {
  custom: {
    50: '#6e579b',
    500: '#2a1871',
    950: '#000000',
  },
}
SCSS
$custom: #2a1871;
$custom-light: #6e579b;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1871",
  "rgb": {
    "r": 42,
    "g": 24,
    "b": 113
  },
  "hsl": {
    "h": 252.135,
    "s": 64.964,
    "l": 26.863
  },
  "oklch": {
    "l": 0.30128,
    "c": 0.14209,
    "h": 283.1
  },
  "luminance": 0.02338
}

Semantic roles & 50–950 ramp

primary
#2A1871
secondary
#91A63E
accent
#E840C6
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2A1871

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

Preview Lab → · Contrast checker → · Palette generator →

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