#2D158D#2D158D

#2D158D is a dark, vivid violet. Relative luminance 0.030; OKLCH L 33.2% C 0.178 H 279.6°. Best body text is #FFFFFF at 13.10:1 contrast (WCAG AA passes).

Color values

HEX#2D158D
RGBrgb(45, 21, 141)
HSLhsl(252, 74%, 32%)
HSVhsv(252, 85%, 55%)
CMYKcmyk(68.1%, 85.1%, 0%, 44.7%)
CIE-LABlab(20.11, 45.15, -60.94)
CIE-LCHlch(20.11, 75.85, 306.53°)
OKLaboklab(33.18% 0.0297 -0.1759)
OKLCHoklch(33.18% 0.178 279.6)
XYZxyz(6.1565, 3.0168, 25.4520)
Luminance0.0302 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D158D #758D15
analogous
#15398D #2D158D #69158D
triadic
#2D158D #8D2D15 #158D2D
tetradic
#2D158D #8D1539 #758D15 #158D69
square
#2D158D #8D1539 #758D15 #158D69
split-complementary
#2D158D #8D6915 #398D15
monochromatic
#0B0522 #1C0D58 #2D158D #3E1DC2 #5C3BE2

Accessibility & contrast

On white

13.10
#2D158D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#2D158D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D158D
13.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D158D#FFFFFF#000000##FFFFFF
##2D158D1.0013.101.6013.10
#FFFFFF13.101.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003590
Deuteranopia (green-blind)
#002C8B
Tritanopia (blue-blind)
#003B53
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #2d158d;
/* rgb */ color: rgb(45, 21, 141);
/* oklch */ color: oklch(33.2% 0.178 279.6);
Tailwind
colors: {
  custom: {
    50: '#7558b0',
    500: '#2d158d',
    950: '#000000',
  },
}
SCSS
$custom: #2d158d;
$custom-light: #7558b0;
$custom-dark: #000000;
JSON
{
  "hex": "#2d158d",
  "rgb": {
    "r": 45,
    "g": 21,
    "b": 141
  },
  "hsl": {
    "h": 252,
    "s": 74.074,
    "l": 31.765
  },
  "oklch": {
    "l": 0.3318,
    "c": 0.17843,
    "h": 279.6
  },
  "luminance": 0.03017
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #2D158D

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

Preview Lab → · Contrast checker → · Palette generator →

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