#2E158F#2E158F

#2E158F is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.5% C 0.181 H 279.7°. Best body text is #FFFFFF at 12.96:1 contrast (WCAG AA passes).

Color values

HEX#2E158F
RGBrgb(46, 21, 143)
HSLhsl(252, 74%, 32%)
HSVhsv(252, 85%, 56%)
CMYKcmyk(67.8%, 85.3%, 0%, 43.9%)
CIE-LABlab(20.44, 45.83, -61.64)
CIE-LCHlch(20.44, 76.81, 306.63°)
OKLaboklab(33.5% 0.0306 -0.1779)
OKLCHoklch(33.5% 0.181 279.7)
XYZxyz(6.3512, 3.0998, 26.2449)
Luminance0.0310 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2E158F #768F15
analogous
#15398F #2E158F #6B158F
triadic
#2E158F #8F2E15 #158F2E
tetradic
#2E158F #8F1539 #768F15 #158F6B
square
#2E158F #8F1539 #768F15 #158F6B
split-complementary
#2E158F #8F6B15 #398F15
monochromatic
#0C0524 #1D0D5A #2E158F #3F1DC4 #5E3CE2

Accessibility & contrast

On white

12.96
#2E158F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#2E158F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2E158F
12.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2E158F#FFFFFF#000000##FFFFFF
##2E158F1.0012.961.6212.96
#FFFFFF12.961.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003692
Deuteranopia (green-blind)
#002D8D
Tritanopia (blue-blind)
#003C54
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #2e158f;
/* rgb */ color: rgb(46, 21, 143);
/* oklch */ color: oklch(33.5% 0.181 279.7);
Tailwind
colors: {
  custom: {
    50: '#7658b1',
    500: '#2e158f',
    950: '#000000',
  },
}
SCSS
$custom: #2e158f;
$custom-light: #7658b1;
$custom-dark: #000000;
JSON
{
  "hex": "#2e158f",
  "rgb": {
    "r": 46,
    "g": 21,
    "b": 143
  },
  "hsl": {
    "h": 252.295,
    "s": 74.39,
    "l": 32.157
  },
  "oklch": {
    "l": 0.33498,
    "c": 0.18056,
    "h": 279.7
  },
  "luminance": 0.031
}

Semantic roles & 50–950 ramp

primary
#2E158F
secondary
#A7C23E
accent
#F137CB
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #2E158F

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

Preview Lab → · Contrast checker → · Palette generator →

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