#2E157E#2E157E

#2E157E is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.6% C 0.161 H 283.1°. Best body text is #FFFFFF at 13.77:1 contrast (WCAG AA passes).

Color values

HEX#2E157E
RGBrgb(46, 21, 126)
HSLhsl(254, 71%, 29%)
HSVhsv(254, 83%, 49%)
CMYKcmyk(63.5%, 83.3%, 0%, 50.6%)
CIE-LABlab(18.47, 40.76, -54.21)
CIE-LCHlch(18.47, 67.82, 306.94°)
OKLaboklab(31.56% 0.0365 -0.1563)
OKLCHoklch(31.56% 0.161 283.1)
XYZxyz(5.1596, 2.6232, 19.9691)
Luminance0.0262 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2E157E #657E15
analogous
#15317E #2E157E #63157E
triadic
#2E157E #7E2E15 #157E2E
tetradic
#2E157E #7E1531 #657E15 #157E63
square
#2E157E #7E1531 #657E15 #157E63
split-complementary
#2E157E #7E6315 #317E15
monochromatic
#0A041A #1B0C4A #2E157E #411EB2 #5A31DD

Accessibility & contrast

On white

13.77
#2E157E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2E157E
13.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2E157E#FFFFFF#000000##FFFFFF
##2E157E1.0013.771.5213.77
#FFFFFF13.771.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.771.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2e157e;
/* rgb */ color: rgb(46, 21, 126);
/* oklch */ color: oklch(31.6% 0.161 283.1);
Tailwind
colors: {
  custom: {
    50: '#7257a5',
    500: '#2e157e',
    950: '#000000',
  },
}
SCSS
$custom: #2e157e;
$custom-light: #7257a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2e157e",
  "rgb": {
    "r": 46,
    "g": 21,
    "b": 126
  },
  "hsl": {
    "h": 254.286,
    "s": 71.429,
    "l": 28.824
  },
  "oklch": {
    "l": 0.31559,
    "c": 0.16051,
    "h": 283.1
  },
  "luminance": 0.02624
}

Semantic roles & 50–950 ramp

primary
#2E157E
secondary
#97B33C
accent
#EE3AC3
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2E157E

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

Preview Lab → · Contrast checker → · Palette generator →

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