#51178A#51178A

#51178A is a dark, vivid violet. Relative luminance 0.042; OKLCH L 37.0% C 0.173 H 300.6°. Best body text is #FFFFFF at 11.42:1 contrast (WCAG AA passes).

Color values

HEX#51178A
RGBrgb(81, 23, 138)
HSLhsl(270, 71%, 32%)
HSVhsv(270, 83%, 54%)
CMYKcmyk(41.3%, 83.3%, 0%, 45.9%)
CIE-LABlab(24.31, 47.94, -52.00)
CIE-LCHlch(24.31, 70.73, 312.68°)
OKLaboklab(36.96% 0.0878 -0.1487)
OKLCHoklch(36.96% 0.173 300.6)
XYZxyz(8.2860, 4.1970, 24.4134)
Luminance0.0420 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51178A #508A17
analogous
#18178A #51178A #8A178A
triadic
#51178A #8A5117 #178A51
tetradic
#51178A #8A1817 #508A17 #178A8A
square
#51178A #8A1817 #508A17 #178A8A
split-complementary
#51178A #8A8A17 #178A18
monochromatic
#130621 #320E56 #51178A #7020BE #8E3DDF

Accessibility & contrast

On white

11.42
#51178A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.84
#51178A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51178A
11.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51178A#FFFFFF#000000##FFFFFF
##51178A1.0011.421.8411.42
#FFFFFF11.421.0021.001.00
#0000001.8421.001.0021.00
##FFFFFF11.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00398D
Deuteranopia (green-blind)
#003988
Tritanopia (blue-blind)
#443852
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #51178a;
/* rgb */ color: rgb(81, 23, 138);
/* oklch */ color: oklch(37.0% 0.173 300.6);
Tailwind
colors: {
  custom: {
    50: '#885dad',
    500: '#51178a',
    950: '#000000',
  },
}
SCSS
$custom: #51178a;
$custom-light: #885dad;
$custom-dark: #000000;
JSON
{
  "hex": "#51178a",
  "rgb": {
    "r": 81,
    "g": 23,
    "b": 138
  },
  "hsl": {
    "h": 270.261,
    "s": 71.429,
    "l": 31.569
  },
  "oklch": {
    "l": 0.36956,
    "c": 0.17269,
    "h": 300.6
  },
  "luminance": 0.04197
}

Semantic roles & 50–950 ramp

primary
#51178A
secondary
#7EBE3F
accent
#EE3A93
background
#F8F5FA
surface
#F0E9F4
border
#CBC5CE
text
#0C0510
muted
#7D797F

Preview Lab

Preview with #51178A

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

Preview Lab → · Contrast checker → · Palette generator →

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