#2D157F#2D157F

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

Color values

HEX#2D157F
RGBrgb(45, 21, 127)
HSLhsl(254, 72%, 29%)
HSVhsv(254, 83%, 50%)
CMYKcmyk(64.6%, 83.5%, 0%, 50.2%)
CIE-LABlab(18.48, 40.95, -54.82)
CIE-LCHlch(18.48, 68.43, 306.76°)
OKLaboklab(31.58% 0.0345 -0.1581)
OKLCHoklch(31.58% 0.162 282.3)
XYZxyz(5.1799, 2.6262, 20.3085)
Luminance0.0263 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D157F #677F15
analogous
#15327F #2D157F #62157F
triadic
#2D157F #7F2D15 #157F2D
tetradic
#2D157F #7F1532 #677F15 #157F62
square
#2D157F #7F1532 #677F15 #157F62
split-complementary
#2D157F #7F6215 #327F15
monochromatic
#09041A #1A0C4A #2D157F #401EB4 #5831DD

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##2D157F#FFFFFF#000000##FFFFFF
##2D157F1.0013.771.5313.77
#FFFFFF13.771.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003082
Deuteranopia (green-blind)
#00297D
Tritanopia (blue-blind)
#00364B
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2d157f;
/* rgb */ color: rgb(45, 21, 127);
/* oklch */ color: oklch(31.6% 0.162 282.3);
Tailwind
colors: {
  custom: {
    50: '#7257a5',
    500: '#2d157f',
    950: '#000000',
  },
}
SCSS
$custom: #2d157f;
$custom-light: #7257a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2d157f",
  "rgb": {
    "r": 45,
    "g": 21,
    "b": 127
  },
  "hsl": {
    "h": 253.585,
    "s": 71.622,
    "l": 29.02
  },
  "oklch": {
    "l": 0.31578,
    "c": 0.16186,
    "h": 282.3
  },
  "luminance": 0.02627
}

Semantic roles & 50–950 ramp

primary
#2D157F
secondary
#99B43C
accent
#EE39C5
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2D157F

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

Preview Lab → · Contrast checker → · Palette generator →

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