#2D157A#2D157A

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

Color values

HEX#2D157A
RGBrgb(45, 21, 122)
HSLhsl(254, 71%, 28%)
HSVhsv(254, 83%, 48%)
CMYKcmyk(63.1%, 82.8%, 0%, 52.2%)
CIE-LABlab(17.91, 39.43, -52.57)
CIE-LCHlch(17.91, 65.71, 306.87°)
OKLaboklab(31.02% 0.0362 -0.1516)
OKLCHoklch(31.02% 0.156 283.4)
XYZxyz(4.8621, 2.4990, 18.6347)
Luminance0.0250 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D157A #627A15
analogous
#15307A #2D157A #5F157A
triadic
#2D157A #7A2D15 #157A2D
tetradic
#2D157A #7A1530 #627A15 #157A5F
square
#2D157A #7A1530 #627A15 #157A5F
split-complementary
#2D157A #7A5F15 #307A15
monochromatic
#0A041A #1A0C46 #2D157A #401EAE #572EDB

Accessibility & contrast

On white

14.00
#2D157A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2D157A
14.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D157A#FFFFFF#000000##FFFFFF
##2D157A1.0014.001.5014.00
#FFFFFF14.001.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF14.001.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2d157a;
/* rgb */ color: rgb(45, 21, 122);
/* oklch */ color: oklch(31.0% 0.156 283.4);
Tailwind
colors: {
  custom: {
    50: '#7157a2',
    500: '#2d157a',
    950: '#000000',
  },
}
SCSS
$custom: #2d157a;
$custom-light: #7157a2;
$custom-dark: #000000;
JSON
{
  "hex": "#2d157a",
  "rgb": {
    "r": 45,
    "g": 21,
    "b": 122
  },
  "hsl": {
    "h": 254.257,
    "s": 70.629,
    "l": 28.039
  },
  "oklch": {
    "l": 0.31018,
    "c": 0.15583,
    "h": 283.4
  },
  "luminance": 0.02499
}

Semantic roles & 50–950 ramp

primary
#2D157A
secondary
#94AF3B
accent
#ED3AC3
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2D157A

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

Preview Lab → · Contrast checker → · Palette generator →

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