#2E1871#2E1871

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

Color values

HEX#2E1871
RGBrgb(46, 24, 113)
HSLhsl(255, 65%, 27%)
HSVhsv(255, 79%, 44%)
CMYKcmyk(59.3%, 78.8%, 0%, 55.7%)
CIE-LABlab(17.58, 35.23, -47.32)
CIE-LCHlch(17.58, 59.00, 306.67°)
OKLaboklab(30.52% 0.0385 -0.1362)
OKLCHoklch(30.52% 0.142 285.8)
XYZxyz(4.4331, 2.4261, 15.8543)
Luminance0.0243 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2E1871 #5B7118
analogous
#182F71 #2E1871 #5B1871
triadic
#2E1871 #712E18 #18712E
tetradic
#2E1871 #71182F #5B7118 #18715B
square
#2E1871 #71182F #5B7118 #18715B
split-complementary
#2E1871 #715B18 #2F7118
monochromatic
#0A0519 #190D3F #2E1871 #4323A3 #5930D3

Accessibility & contrast

On white

14.14
#2E1871 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.49
#2E1871 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2E1871
14.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2E1871#FFFFFF#000000##FFFFFF
##2E18711.0014.141.4914.14
#FFFFFF14.141.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D74
Deuteranopia (green-blind)
#00286F
Tritanopia (blue-blind)
#0D3143
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #2e1871;
/* rgb */ color: rgb(46, 24, 113);
/* oklch */ color: oklch(30.5% 0.142 285.8);
Tailwind
colors: {
  custom: {
    50: '#70589b',
    500: '#2e1871',
    950: '#000000',
  },
}
SCSS
$custom: #2e1871;
$custom-light: #70589b;
$custom-dark: #000000;
JSON
{
  "hex": "#2e1871",
  "rgb": {
    "r": 46,
    "g": 24,
    "b": 113
  },
  "hsl": {
    "h": 254.831,
    "s": 64.964,
    "l": 26.863
  },
  "oklch": {
    "l": 0.30519,
    "c": 0.14159,
    "h": 285.8
  },
  "luminance": 0.02426
}

Semantic roles & 50–950 ramp

primary
#2E1871
secondary
#8DA63E
accent
#E840BE
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2E1871

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

Preview Lab → · Contrast checker → · Palette generator →

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