#512778#512778

#512778 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.3% C 0.134 H 304.5°. Best body text is #FFFFFF at 10.99:1 contrast (WCAG AA passes).

Color values

HEX#512778
RGBrgb(81, 39, 120)
HSLhsl(271, 51%, 31%)
HSVhsv(271, 68%, 47%)
CMYKcmyk(32.5%, 67.5%, 0%, 52.9%)
CIE-LABlab(25.43, 35.95, -38.84)
CIE-LCHlch(25.43, 52.92, 312.79°)
OKLaboklab(37.28% 0.0757 -0.1101)
OKLCHoklch(37.28% 0.134 304.5)
XYZxyz(7.5083, 4.5565, 18.2496)
Luminance0.0456 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512778 #4E7827
analogous
#282778 #512778 #782776
triadic
#512778 #785127 #277851
tetradic
#512778 #782827 #4E7827 #277678
square
#512778 #782827 #4E7827 #277678
split-complementary
#512778 #767827 #277828
monochromatic
#13091C #32184A #512778 #7036A6 #8F52C7

Accessibility & contrast

On white

10.99
#512778 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.91
#512778 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512778
10.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512778#FFFFFF#000000##FFFFFF
##5127781.0010.991.9110.99
#FFFFFF10.991.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF10.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B7A
Deuteranopia (green-blind)
#0F3C76
Tritanopia (blue-blind)
#4A384C
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #512778;
/* rgb */ color: rgb(81, 39, 120);
/* oklch */ color: oklch(37.3% 0.134 304.5);
Tailwind
colors: {
  custom: {
    50: '#85649f',
    500: '#512778',
    950: '#000000',
  },
}
SCSS
$custom: #512778;
$custom-light: #85649f;
$custom-dark: #000000;
JSON
{
  "hex": "#512778",
  "rgb": {
    "r": 81,
    "g": 39,
    "b": 120
  },
  "hsl": {
    "h": 271.111,
    "s": 50.943,
    "l": 31.176
  },
  "oklch": {
    "l": 0.37281,
    "c": 0.13364,
    "h": 304.5
  },
  "luminance": 0.04556
}

Semantic roles & 50–950 ramp

primary
#512778
secondary
#7CAA51
accent
#DA4D91
background
#F8F6F9
surface
#F0EBF2
border
#CBC6CC
text
#0B050F
muted
#7C7A7E

Preview Lab

Preview with #512778

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

Preview Lab → · Contrast checker → · Palette generator →

#512778 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva