#2E1271#2E1271

#2E1271 is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.8% C 0.148 H 286.9°. Best body text is #FFFFFF at 14.57:1 contrast (WCAG AA passes).

Color values

HEX#2E1271
RGBrgb(46, 18, 113)
HSLhsl(258, 73%, 26%)
HSVhsv(258, 84%, 44%)
CMYKcmyk(59.3%, 84.1%, 0%, 55.7%)
CIE-LABlab(16.53, 38.26, -49.05)
CIE-LCHlch(16.53, 62.20, 307.95°)
OKLaboklab(29.79% 0.0429 -0.1412)
OKLCHoklch(29.79% 0.148 286.9)
XYZxyz(4.3228, 2.2055, 15.8175)
Luminance0.0221 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2E1271 #557112
analogous
#122571 #2E1271 #5D1271
triadic
#2E1271 #712E12 #12712E
tetradic
#2E1271 #711225 #557112 #12715D
square
#2E1271 #711225 #557112 #12715D
split-complementary
#2E1271 #715D12 #257112
monochromatic
#0B041A #190A3C #2E1271 #431AA6 #5923DB

Accessibility & contrast

On white

14.57
#2E1271 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.44
#2E1271 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2E1271
14.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2E1271#FFFFFF#000000##FFFFFF
##2E12711.0014.571.4414.57
#FFFFFF14.571.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B74
Deuteranopia (green-blind)
#00266F
Tritanopia (blue-blind)
#0E2E42
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #2e1271;
/* rgb */ color: rgb(46, 18, 113);
/* oklch */ color: oklch(29.8% 0.148 286.9);
Tailwind
colors: {
  custom: {
    50: '#70549b',
    500: '#2e1271',
    950: '#000000',
  },
}
SCSS
$custom: #2e1271;
$custom-light: #70549b;
$custom-dark: #000000;
JSON
{
  "hex": "#2e1271",
  "rgb": {
    "r": 46,
    "g": 18,
    "b": 113
  },
  "hsl": {
    "h": 257.684,
    "s": 72.519,
    "l": 25.686
  },
  "oklch": {
    "l": 0.29787,
    "c": 0.14761,
    "h": 286.9
  },
  "luminance": 0.02206
}

Semantic roles & 50–950 ramp

primary
#2E1271
secondary
#87A837
accent
#EF39B9
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2E1271

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

Preview Lab → · Contrast checker → · Palette generator →

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