#2D178C#2D178C

#2D178C is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.3% C 0.176 H 279.5°. Best body text is #FFFFFF at 13.02:1 contrast (WCAG AA passes).

Color values

HEX#2D178C
RGBrgb(45, 23, 140)
HSLhsl(251, 72%, 32%)
HSVhsv(251, 84%, 55%)
CMYKcmyk(67.9%, 83.6%, 0%, 45.1%)
CIE-LABlab(20.30, 43.96, -60.01)
CIE-LCHlch(20.30, 74.39, 306.23°)
OKLaboklab(33.27% 0.0291 -0.1733)
OKLCHoklch(33.27% 0.176 279.5)
XYZxyz(6.1207, 3.0636, 25.0746)
Luminance0.0306 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D178C #768C17
analogous
#173C8C #2D178C #68178C
triadic
#2D178C #8C2D17 #178C2D
tetradic
#2D178C #8C173C #768C17 #178C68
square
#2D178C #8C173C #768C17 #178C68
split-complementary
#2D178C #8C6817 #3C8C17
monochromatic
#0B0623 #1C0E57 #2D178C #3E20C1 #5C3EDF

Accessibility & contrast

On white

13.02
#2D178C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#2D178C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D178C
13.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D178C#FFFFFF#000000##FFFFFF
##2D178C1.0013.021.6113.02
#FFFFFF13.021.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00358F
Deuteranopia (green-blind)
#002C8A
Tritanopia (blue-blind)
#003C53
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #2d178c;
/* rgb */ color: rgb(45, 23, 140);
/* oklch */ color: oklch(33.3% 0.176 279.5);
Tailwind
colors: {
  custom: {
    50: '#7559af',
    500: '#2d178c',
    950: '#000000',
  },
}
SCSS
$custom: #2d178c;
$custom-light: #7559af;
$custom-dark: #000000;
JSON
{
  "hex": "#2d178c",
  "rgb": {
    "r": 45,
    "g": 23,
    "b": 140
  },
  "hsl": {
    "h": 251.282,
    "s": 71.779,
    "l": 31.961
  },
  "oklch": {
    "l": 0.33274,
    "c": 0.1757,
    "h": 279.5
  },
  "luminance": 0.03064
}

Semantic roles & 50–950 ramp

primary
#2D178C
secondary
#A7BF3F
accent
#EF39CC
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #2D178C

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

Preview Lab → · Contrast checker → · Palette generator →

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