#2E157B#2E157B

#2E157B is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.2% C 0.157 H 283.8°. Best body text is #FFFFFF at 13.91:1 contrast (WCAG AA passes).

Color values

HEX#2E157B
RGBrgb(46, 21, 123)
HSLhsl(255, 71%, 28%)
HSVhsv(255, 83%, 48%)
CMYKcmyk(62.6%, 82.9%, 0%, 51.8%)
CIE-LABlab(18.13, 39.85, -52.85)
CIE-LCHlch(18.13, 66.19, 307.02°)
OKLaboklab(31.23% 0.0375 -0.1524)
OKLCHoklch(31.23% 0.157 283.8)
XYZxyz(4.9689, 2.5469, 18.9648)
Luminance0.0255 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2E157B #627B15
analogous
#152F7B #2E157B #61157B
triadic
#2E157B #7B2E15 #157B2E
tetradic
#2E157B #7B152F #627B15 #157B61
square
#2E157B #7B152F #627B15 #157B61
split-complementary
#2E157B #7B6115 #2F7B15
monochromatic
#0A041A #1A0C47 #2E157B #421EAF #592FDB

Accessibility & contrast

On white

13.91
#2E157B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.51
#2E157B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2E157B
13.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2E157B#FFFFFF#000000##FFFFFF
##2E157B1.0013.911.5113.91
#FFFFFF13.911.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7E
Deuteranopia (green-blind)
#002979
Tritanopia (blue-blind)
#003448
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2e157b;
/* rgb */ color: rgb(46, 21, 123);
/* oklch */ color: oklch(31.2% 0.157 283.8);
Tailwind
colors: {
  custom: {
    50: '#7257a2',
    500: '#2e157b',
    950: '#000000',
  },
}
SCSS
$custom: #2e157b;
$custom-light: #7257a2;
$custom-dark: #000000;
JSON
{
  "hex": "#2e157b",
  "rgb": {
    "r": 46,
    "g": 21,
    "b": 123
  },
  "hsl": {
    "h": 254.706,
    "s": 70.833,
    "l": 28.235
  },
  "oklch": {
    "l": 0.31226,
    "c": 0.15691,
    "h": 283.8
  },
  "luminance": 0.02547
}

Semantic roles & 50–950 ramp

primary
#2E157B
secondary
#94B03B
accent
#EE3AC2
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2E157B

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

Preview Lab → · Contrast checker → · Palette generator →

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