#51178C#51178C

#51178C is a dark, vivid violet. Relative luminance 0.043; OKLCH L 37.1% C 0.175 H 299.9°. Best body text is #FFFFFF at 11.34:1 contrast (WCAG AA passes).

Color values

HEX#51178C
RGBrgb(81, 23, 140)
HSLhsl(270, 72%, 32%)
HSVhsv(270, 84%, 55%)
CMYKcmyk(42.1%, 83.6%, 0%, 45.1%)
CIE-LABlab(24.50, 48.44, -52.94)
CIE-LCHlch(24.50, 71.76, 312.46°)
OKLaboklab(37.14% 0.0871 -0.1515)
OKLCHoklch(37.14% 0.175 299.9)
XYZxyz(8.4322, 4.2555, 25.1830)
Luminance0.0426 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51178C #528C17
analogous
#17178C #51178C #8C178C
triadic
#51178C #8C5117 #178C51
tetradic
#51178C #8C1717 #528C17 #178C8C
square
#51178C #8C1717 #528C17 #178C8C
split-complementary
#51178C #8C8C17 #178C17
monochromatic
#140623 #330E57 #51178C #6F20C1 #8E3EDF

Accessibility & contrast

On white

11.34
#51178C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.85
#51178C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51178C
11.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51178C#FFFFFF#000000##FFFFFF
##51178C1.0011.341.8511.34
#FFFFFF11.341.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A8F
Deuteranopia (green-blind)
#00398A
Tritanopia (blue-blind)
#433953
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #51178c;
/* rgb */ color: rgb(81, 23, 140);
/* oklch */ color: oklch(37.1% 0.175 299.9);
Tailwind
colors: {
  custom: {
    50: '#885daf',
    500: '#51178c',
    950: '#000000',
  },
}
SCSS
$custom: #51178c;
$custom-light: #885daf;
$custom-dark: #000000;
JSON
{
  "hex": "#51178c",
  "rgb": {
    "r": 81,
    "g": 23,
    "b": 140
  },
  "hsl": {
    "h": 269.744,
    "s": 71.779,
    "l": 31.961
  },
  "oklch": {
    "l": 0.37142,
    "c": 0.17473,
    "h": 299.9
  },
  "luminance": 0.04256
}

Semantic roles & 50–950 ramp

primary
#51178C
secondary
#80BF3F
accent
#EF3995
background
#F8F5FA
surface
#F0E9F5
border
#CBC5CF
text
#0C0510
muted
#7D797F

Preview Lab

Preview with #51178C

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

Preview Lab → · Contrast checker → · Palette generator →

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