#51178E#51178E

#51178E is a dark, vivid violet. Relative luminance 0.043; OKLCH L 37.3% C 0.177 H 299.3°. Best body text is #FFFFFF at 11.27:1 contrast (WCAG AA passes).

Color values

HEX#51178E
RGBrgb(81, 23, 142)
HSLhsl(269, 72%, 32%)
HSVhsv(269, 84%, 56%)
CMYKcmyk(43%, 83.8%, 0%, 44.3%)
CIE-LABlab(24.69, 48.93, -53.88)
CIE-LCHlch(24.69, 72.78, 312.25°)
OKLaboklab(37.33% 0.0865 -0.1542)
OKLCHoklch(37.33% 0.177 299.3)
XYZxyz(8.5810, 4.3150, 25.9667)
Luminance0.0432 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51178E #548E17
analogous
#17188E #51178E #8D178E
triadic
#51178E #8E5117 #178E51
tetradic
#51178E #8E1718 #548E17 #178E8D
square
#51178E #8E1718 #548E17 #178E8D
split-complementary
#51178E #8E8D17 #188E17
monochromatic
#150625 #330E59 #51178E #6F20C3 #8E3FE0

Accessibility & contrast

On white

11.27
#51178E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.86
#51178E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51178E
11.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51178E#FFFFFF#000000##FFFFFF
##51178E1.0011.271.8611.27
#FFFFFF11.271.0021.001.00
#0000001.8621.001.0021.00
##FFFFFF11.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A91
Deuteranopia (green-blind)
#003A8C
Tritanopia (blue-blind)
#423954
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #51178e;
/* rgb */ color: rgb(81, 23, 142);
/* oklch */ color: oklch(37.3% 0.177 299.3);
Tailwind
colors: {
  custom: {
    50: '#895db0',
    500: '#51178e',
    950: '#000000',
  },
}
SCSS
$custom: #51178e;
$custom-light: #895db0;
$custom-dark: #000000;
JSON
{
  "hex": "#51178e",
  "rgb": {
    "r": 81,
    "g": 23,
    "b": 142
  },
  "hsl": {
    "h": 269.244,
    "s": 72.121,
    "l": 32.353
  },
  "oklch": {
    "l": 0.37329,
    "c": 0.17679,
    "h": 299.3
  },
  "luminance": 0.04315
}

Semantic roles & 50–950 ramp

primary
#51178E
secondary
#82C040
accent
#EF3996
background
#F8F5FB
surface
#F0E9F6
border
#CBC5D0
text
#0C0511
muted
#7D7980

Preview Lab

Preview with #51178E

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

Preview Lab → · Contrast checker → · Palette generator →

#51178E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva