#2E157D#2E157D

#2E157D is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.4% C 0.159 H 283.4°. Best body text is #FFFFFF at 13.82:1 contrast (WCAG AA passes).

Color values

HEX#2E157D
RGBrgb(46, 21, 125)
HSLhsl(254, 71%, 29%)
HSVhsv(254, 83%, 49%)
CMYKcmyk(63.2%, 83.2%, 0%, 51%)
CIE-LABlab(18.35, 40.45, -53.75)
CIE-LCHlch(18.35, 67.28, 306.96°)
OKLaboklab(31.45% 0.0368 -0.155)
OKLCHoklch(31.45% 0.159 283.4)
XYZxyz(5.0954, 2.5975, 19.6309)
Luminance0.0260 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2E157D #647D15
analogous
#15307D #2E157D #62157D
triadic
#2E157D #7D2E15 #157D2E
tetradic
#2E157D #7D1530 #647D15 #157D62
square
#2E157D #7D1530 #647D15 #157D62
split-complementary
#2E157D #7D6215 #307D15
monochromatic
#0A041A #1B0C49 #2E157D #411EB1 #5A30DC

Accessibility & contrast

On white

13.82
#2E157D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2E157D
13.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2E157D#FFFFFF#000000##FFFFFF
##2E157D1.0013.821.5213.82
#FFFFFF13.821.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003080
Deuteranopia (green-blind)
#00297B
Tritanopia (blue-blind)
#00354A
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2e157d;
/* rgb */ color: rgb(46, 21, 125);
/* oklch */ color: oklch(31.4% 0.159 283.4);
Tailwind
colors: {
  custom: {
    50: '#7257a4',
    500: '#2e157d',
    950: '#000000',
  },
}
SCSS
$custom: #2e157d;
$custom-light: #7257a4;
$custom-dark: #000000;
JSON
{
  "hex": "#2e157d",
  "rgb": {
    "r": 46,
    "g": 21,
    "b": 125
  },
  "hsl": {
    "h": 254.423,
    "s": 71.233,
    "l": 28.627
  },
  "oklch": {
    "l": 0.31448,
    "c": 0.15931,
    "h": 283.4
  },
  "luminance": 0.02598
}

Semantic roles & 50–950 ramp

primary
#2E157D
secondary
#96B23C
accent
#EE3AC3
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2E157D

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

Preview Lab → · Contrast checker → · Palette generator →

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