#2D158A#2D158A

#2D158A is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.8% C 0.175 H 280.1°. Best body text is #FFFFFF at 13.24:1 contrast (WCAG AA passes).

Color values

HEX#2D158A
RGBrgb(45, 21, 138)
HSLhsl(252, 74%, 31%)
HSVhsv(252, 85%, 54%)
CMYKcmyk(67.4%, 84.8%, 0%, 45.9%)
CIE-LABlab(19.76, 44.26, -59.65)
CIE-LCHlch(19.76, 74.28, 306.57°)
OKLaboklab(32.83% 0.0307 -0.1722)
OKLCHoklch(32.83% 0.175 280.1)
XYZxyz(5.9363, 2.9287, 24.2923)
Luminance0.0293 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D158A #728A15
analogous
#15378A #2D158A #67158A
triadic
#2D158A #8A2D15 #158A2D
tetradic
#2D158A #8A1537 #728A15 #158A67
square
#2D158A #8A1537 #728A15 #158A67
split-complementary
#2D158A #8A6715 #378A15
monochromatic
#0A0520 #1C0D55 #2D158A #3E1DBF #5B39E1

Accessibility & contrast

On white

13.24
#2D158A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.59
#2D158A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D158A
13.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D158A#FFFFFF#000000##FFFFFF
##2D158A1.0013.241.5913.24
#FFFFFF13.241.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00348D
Deuteranopia (green-blind)
#002B88
Tritanopia (blue-blind)
#003A51
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #2d158a;
/* rgb */ color: rgb(45, 21, 138);
/* oklch */ color: oklch(32.8% 0.175 280.1);
Tailwind
colors: {
  custom: {
    50: '#7558ad',
    500: '#2d158a',
    950: '#000000',
  },
}
SCSS
$custom: #2d158a;
$custom-light: #7558ad;
$custom-dark: #000000;
JSON
{
  "hex": "#2d158a",
  "rgb": {
    "r": 45,
    "g": 21,
    "b": 138
  },
  "hsl": {
    "h": 252.308,
    "s": 73.585,
    "l": 31.176
  },
  "oklch": {
    "l": 0.32833,
    "c": 0.17492,
    "h": 280.1
  },
  "luminance": 0.02929
}

Semantic roles & 50–950 ramp

primary
#2D158A
secondary
#A3BE3D
accent
#F038CA
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0310
muted
#7C787F

Preview Lab

Preview with #2D158A

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

Preview Lab → · Contrast checker → · Palette generator →

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