#2D1788#2D1788

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

Color values

HEX#2D1788
RGBrgb(45, 23, 136)
HSLhsl(252, 71%, 31%)
HSVhsv(252, 83%, 53%)
CMYKcmyk(66.9%, 83.1%, 0%, 46.7%)
CIE-LABlab(19.83, 42.74, -58.27)
CIE-LCHlch(19.83, 72.27, 306.26°)
OKLaboklab(32.82% 0.0304 -0.1682)
OKLCHoklch(32.82% 0.171 280.3)
XYZxyz(5.8311, 2.9478, 23.5495)
Luminance0.0295 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D1788 #728817
analogous
#173988 #2D1788 #651788
triadic
#2D1788 #882D17 #17882D
tetradic
#2D1788 #881739 #728817 #178865
square
#2D1788 #881739 #728817 #178865
split-complementary
#2D1788 #886517 #398817
monochromatic
#0A051F #1C0E54 #2D1788 #3E20BC #5B3BDE

Accessibility & contrast

On white

13.21
#2D1788 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2D1788
13.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D1788#FFFFFF#000000##FFFFFF
##2D17881.0013.211.5913.21
#FFFFFF13.211.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00348B
Deuteranopia (green-blind)
#002C86
Tritanopia (blue-blind)
#003A50
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #2d1788;
/* rgb */ color: rgb(45, 23, 136);
/* oklch */ color: oklch(32.8% 0.171 280.3);
Tailwind
colors: {
  custom: {
    50: '#7459ac',
    500: '#2d1788',
    950: '#000000',
  },
}
SCSS
$custom: #2d1788;
$custom-light: #7459ac;
$custom-dark: #000000;
JSON
{
  "hex": "#2d1788",
  "rgb": {
    "r": 45,
    "g": 23,
    "b": 136
  },
  "hsl": {
    "h": 251.681,
    "s": 71.069,
    "l": 31.176
  },
  "oklch": {
    "l": 0.32818,
    "c": 0.17094,
    "h": 280.3
  },
  "luminance": 0.02948
}

Semantic roles & 50–950 ramp

primary
#2D1788
secondary
#A3BC3F
accent
#EE3ACB
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #2D1788

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

Preview Lab → · Contrast checker → · Palette generator →

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