#2E157A#2E157A

#2E157A is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.1% C 0.156 H 284.1°. Best body text is #FFFFFF at 13.96:1 contrast (WCAG AA passes).

Color values

HEX#2E157A
RGBrgb(46, 21, 122)
HSLhsl(255, 71%, 28%)
HSVhsv(255, 83%, 48%)
CMYKcmyk(62.3%, 82.8%, 0%, 52.2%)
CIE-LABlab(18.02, 39.55, -52.39)
CIE-LCHlch(18.02, 65.64, 307.04°)
OKLaboklab(31.12% 0.0378 -0.151)
OKLCHoklch(31.12% 0.156 284.1)
XYZxyz(4.9067, 2.5220, 18.6368)
Luminance0.0252 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2E157A #617A15
analogous
#152F7A #2E157A #60157A
triadic
#2E157A #7A2E15 #157A2E
tetradic
#2E157A #7A152F #617A15 #157A60
square
#2E157A #7A152F #617A15 #157A60
split-complementary
#2E157A #7A6015 #2F7A15
monochromatic
#0A041A #1A0C46 #2E157A #421EAE #592EDB

Accessibility & contrast

On white

13.96
#2E157A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.50
#2E157A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2E157A
13.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2E157A#FFFFFF#000000##FFFFFF
##2E157A1.0013.961.5013.96
#FFFFFF13.961.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF13.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7D
Deuteranopia (green-blind)
#002978
Tritanopia (blue-blind)
#003348
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2e157a;
/* rgb */ color: rgb(46, 21, 122);
/* oklch */ color: oklch(31.1% 0.156 284.1);
Tailwind
colors: {
  custom: {
    50: '#7257a2',
    500: '#2e157a',
    950: '#000000',
  },
}
SCSS
$custom: #2e157a;
$custom-light: #7257a2;
$custom-dark: #000000;
JSON
{
  "hex": "#2e157a",
  "rgb": {
    "r": 46,
    "g": 21,
    "b": 122
  },
  "hsl": {
    "h": 254.851,
    "s": 70.629,
    "l": 28.039
  },
  "oklch": {
    "l": 0.31115,
    "c": 0.1557,
    "h": 284.1
  },
  "luminance": 0.02522
}

Semantic roles & 50–950 ramp

primary
#2E157A
secondary
#93AF3B
accent
#ED3AC1
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2E157A

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

Preview Lab → · Contrast checker → · Palette generator →

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