#2E1878#2E1878

#2E1878 is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.3% C 0.150 H 284.0°. Best body text is #FFFFFF at 13.83:1 contrast (WCAG AA passes).

Color values

HEX#2E1878
RGBrgb(46, 24, 120)
HSLhsl(254, 67%, 28%)
HSVhsv(254, 80%, 47%)
CMYKcmyk(61.7%, 80%, 0%, 52.9%)
CIE-LABlab(18.32, 37.43, -50.61)
CIE-LCHlch(18.32, 62.95, 306.48°)
OKLaboklab(31.26% 0.0365 -0.1459)
OKLCHoklch(31.26% 0.15 284)
XYZxyz(4.8425, 2.5899, 18.0104)
Luminance0.0259 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2E1878 #627818
analogous
#183278 #2E1878 #5E1878
triadic
#2E1878 #782E18 #18782E
tetradic
#2E1878 #781832 #627818 #18785E
square
#2E1878 #781832 #627818 #18785E
split-complementary
#2E1878 #785E18 #327818
monochromatic
#0A051A #1A0E45 #2E1878 #4222AB #5934D6

Accessibility & contrast

On white

13.83
#2E1878 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#2E1878 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2E1878
13.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2E1878#FFFFFF#000000##FFFFFF
##2E18781.0013.831.5213.83
#FFFFFF13.831.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7B
Deuteranopia (green-blind)
#002A76
Tritanopia (blue-blind)
#003447
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2e1878;
/* rgb */ color: rgb(46, 24, 120);
/* oklch */ color: oklch(31.3% 0.150 284.0);
Tailwind
colors: {
  custom: {
    50: '#7158a0',
    500: '#2e1878',
    950: '#000000',
  },
}
SCSS
$custom: #2e1878;
$custom-light: #7158a0;
$custom-dark: #000000;
JSON
{
  "hex": "#2e1878",
  "rgb": {
    "r": 46,
    "g": 24,
    "b": 120
  },
  "hsl": {
    "h": 253.75,
    "s": 66.667,
    "l": 28.235
  },
  "oklch": {
    "l": 0.3126,
    "c": 0.15036,
    "h": 284
  },
  "luminance": 0.0259
}

Semantic roles & 50–950 ramp

primary
#2E1878
secondary
#94AD3F
accent
#EA3EC2
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#08030F
muted
#7B787F

Preview Lab

Preview with #2E1878

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

Preview Lab → · Contrast checker → · Palette generator →

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