#2E157F#2E157F

#2E157F is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.7% C 0.162 H 282.9°. Best body text is #FFFFFF at 13.73:1 contrast (WCAG AA passes).

Color values

HEX#2E157F
RGBrgb(46, 21, 127)
HSLhsl(254, 72%, 29%)
HSVhsv(254, 83%, 50%)
CMYKcmyk(63.8%, 83.5%, 0%, 50.2%)
CIE-LABlab(18.58, 41.06, -54.65)
CIE-LCHlch(18.58, 68.36, 306.92°)
OKLaboklab(31.67% 0.0361 -0.1576)
OKLCHoklch(31.67% 0.162 282.9)
XYZxyz(5.2245, 2.6491, 20.3106)
Luminance0.0265 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2E157F #667F15
analogous
#15317F #2E157F #63157F
triadic
#2E157F #7F2E15 #157F2E
tetradic
#2E157F #7F1531 #667F15 #157F63
square
#2E157F #7F1531 #667F15 #157F63
split-complementary
#2E157F #7F6315 #317F15
monochromatic
#0A041A #1B0C4A #2E157F #411EB4 #5A31DD

Accessibility & contrast

On white

13.73
#2E157F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#2E157F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2E157F
13.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2E157F#FFFFFF#000000##FFFFFF
##2E157F1.0013.731.5313.73
#FFFFFF13.731.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003082
Deuteranopia (green-blind)
#002A7D
Tritanopia (blue-blind)
#00354B
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2e157f;
/* rgb */ color: rgb(46, 21, 127);
/* oklch */ color: oklch(31.7% 0.162 282.9);
Tailwind
colors: {
  custom: {
    50: '#7357a5',
    500: '#2e157f',
    950: '#000000',
  },
}
SCSS
$custom: #2e157f;
$custom-light: #7357a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2e157f",
  "rgb": {
    "r": 46,
    "g": 21,
    "b": 127
  },
  "hsl": {
    "h": 254.151,
    "s": 71.622,
    "l": 29.02
  },
  "oklch": {
    "l": 0.31671,
    "c": 0.16171,
    "h": 282.9
  },
  "luminance": 0.02649
}

Semantic roles & 50–950 ramp

primary
#2E157F
secondary
#98B43C
accent
#EE39C4
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2E157F

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

Preview Lab → · Contrast checker → · Palette generator →

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