#2D178E#2D178E

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

Color values

HEX#2D178E
RGBrgb(45, 23, 142)
HSLhsl(251, 72%, 32%)
HSVhsv(251, 84%, 56%)
CMYKcmyk(68.3%, 83.8%, 0%, 44.3%)
CIE-LABlab(20.53, 44.57, -60.87)
CIE-LCHlch(20.53, 75.44, 306.21°)
OKLaboklab(33.5% 0.0285 -0.1758)
OKLCHoklch(33.5% 0.178 279.2)
XYZxyz(6.2695, 3.1231, 25.8584)
Luminance0.0312 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D178E #788E17
analogous
#173D8E #2D178E #68178E
triadic
#2D178E #8E2D17 #178E2D
tetradic
#2D178E #8E173D #788E17 #178E68
square
#2D178E #8E173D #788E17 #178E68
split-complementary
#2D178E #8E6817 #3D8E17
monochromatic
#0C0625 #1C0E59 #2D178E #3E20C3 #5D3FE0

Accessibility & contrast

On white

12.92
#2D178E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2D178E
12.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D178E#FFFFFF#000000##FFFFFF
##2D178E1.0012.921.6212.92
#FFFFFF12.921.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.921.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2d178e;
/* rgb */ color: rgb(45, 23, 142);
/* oklch */ color: oklch(33.5% 0.178 279.2);
Tailwind
colors: {
  custom: {
    50: '#7559b0',
    500: '#2d178e',
    950: '#000000',
  },
}
SCSS
$custom: #2d178e;
$custom-light: #7559b0;
$custom-dark: #000000;
JSON
{
  "hex": "#2d178e",
  "rgb": {
    "r": 45,
    "g": 23,
    "b": 142
  },
  "hsl": {
    "h": 251.092,
    "s": 72.121,
    "l": 32.353
  },
  "oklch": {
    "l": 0.33504,
    "c": 0.17806,
    "h": 279.2
  },
  "luminance": 0.03124
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #2D178E

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

Preview Lab → · Contrast checker → · Palette generator →

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