#2D158F#2D158F

#2D158F is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.4% C 0.181 H 279.2°. Best body text is #FFFFFF at 13.00:1 contrast (WCAG AA passes).

Color values

HEX#2D158F
RGBrgb(45, 21, 143)
HSLhsl(252, 74%, 32%)
HSVhsv(252, 85%, 56%)
CMYKcmyk(68.5%, 85.3%, 0%, 43.9%)
CIE-LABlab(20.35, 45.74, -61.79)
CIE-LCHlch(20.35, 76.88, 306.51°)
OKLaboklab(33.41% 0.029 -0.1784)
OKLCHoklch(33.41% 0.181 279.2)
XYZxyz(6.3067, 3.0769, 26.2428)
Luminance0.0308 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D158F #778F15
analogous
#153A8F #2D158F #6A158F
triadic
#2D158F #8F2D15 #158F2D
tetradic
#2D158F #8F153A #778F15 #158F6A
square
#2D158F #8F153A #778F15 #158F6A
split-complementary
#2D158F #8F6A15 #3A8F15
monochromatic
#0B0524 #1C0D5A #2D158F #3E1DC4 #5D3CE2

Accessibility & contrast

On white

13.00
#2D158F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#2D158F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D158F
13.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D158F#FFFFFF#000000##FFFFFF
##2D158F1.0013.001.6213.00
#FFFFFF13.001.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF13.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003592
Deuteranopia (green-blind)
#002C8D
Tritanopia (blue-blind)
#003C54
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #2d158f;
/* rgb */ color: rgb(45, 21, 143);
/* oklch */ color: oklch(33.4% 0.181 279.2);
Tailwind
colors: {
  custom: {
    50: '#7658b1',
    500: '#2d158f',
    950: '#000000',
  },
}
SCSS
$custom: #2d158f;
$custom-light: #7658b1;
$custom-dark: #000000;
JSON
{
  "hex": "#2d158f",
  "rgb": {
    "r": 45,
    "g": 21,
    "b": 143
  },
  "hsl": {
    "h": 251.803,
    "s": 74.39,
    "l": 32.157
  },
  "oklch": {
    "l": 0.33413,
    "c": 0.18076,
    "h": 279.2
  },
  "luminance": 0.03077
}

Semantic roles & 50–950 ramp

primary
#2D158F
secondary
#A8C23E
accent
#F137CC
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #2D158F

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

Preview Lab → · Contrast checker → · Palette generator →

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