#2D178D#2D178D

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

Color values

HEX#2D178D
RGBrgb(45, 23, 141)
HSLhsl(251, 72%, 32%)
HSVhsv(251, 84%, 55%)
CMYKcmyk(68.1%, 83.7%, 0%, 44.7%)
CIE-LABlab(20.41, 44.26, -60.44)
CIE-LCHlch(20.41, 74.91, 306.22°)
OKLaboklab(33.39% 0.0288 -0.1745)
OKLCHoklch(33.39% 0.177 279.4)
XYZxyz(6.1948, 3.0933, 25.4647)
Luminance0.0309 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D178D #778D17
analogous
#173C8D #2D178D #68178D
triadic
#2D178D #8D2D17 #178D2D
tetradic
#2D178D #8D173C #778D17 #178D68
square
#2D178D #8D173C #778D17 #178D68
split-complementary
#2D178D #8D6817 #3C8D17
monochromatic
#0B0624 #1C0E58 #2D178D #3E20C2 #5D3FE0

Accessibility & contrast

On white

12.97
#2D178D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2D178D
12.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D178D#FFFFFF#000000##FFFFFF
##2D178D1.0012.971.6212.97
#FFFFFF12.971.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.971.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2d178d;
/* rgb */ color: rgb(45, 23, 141);
/* oklch */ color: oklch(33.4% 0.177 279.4);
Tailwind
colors: {
  custom: {
    50: '#7559b0',
    500: '#2d178d',
    950: '#000000',
  },
}
SCSS
$custom: #2d178d;
$custom-light: #7559b0;
$custom-dark: #000000;
JSON
{
  "hex": "#2d178d",
  "rgb": {
    "r": 45,
    "g": 23,
    "b": 141
  },
  "hsl": {
    "h": 251.186,
    "s": 71.951,
    "l": 32.157
  },
  "oklch": {
    "l": 0.33389,
    "c": 0.17688,
    "h": 279.4
  },
  "luminance": 0.03094
}

Semantic roles & 50–950 ramp

primary
#2D178D
secondary
#A8C040
accent
#EF39CD
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #2D178D

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

Preview Lab → · Contrast checker → · Palette generator →

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