#512478#512478

#512478 is a dark, vivid violet. Relative luminance 0.044; OKLCH L 36.9% C 0.138 H 305.1°. Best body text is #FFFFFF at 11.21:1 contrast (WCAG AA passes).

Color values

HEX#512478
RGBrgb(81, 36, 120)
HSLhsl(272, 54%, 31%)
HSVhsv(272, 70%, 47%)
CMYKcmyk(32.5%, 70%, 0%, 52.9%)
CIE-LABlab(24.85, 37.55, -39.78)
CIE-LCHlch(24.85, 54.70, 313.35°)
OKLaboklab(36.86% 0.0794 -0.1129)
OKLCHoklch(36.86% 0.138 305.1)
XYZxyz(7.4136, 4.3672, 18.2180)
Luminance0.0437 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512478 #4B7824
analogous
#272478 #512478 #782475
triadic
#512478 #785124 #247851
tetradic
#512478 #782724 #4B7824 #247578
square
#512478 #782724 #4B7824 #247578
split-complementary
#512478 #757824 #247827
monochromatic
#11081A #311649 #512478 #7132A7 #904DCA

Accessibility & contrast

On white

11.21
#512478 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#512478 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512478
11.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512478#FFFFFF#000000##FFFFFF
##5124781.0011.211.8711.21
#FFFFFF11.211.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A7B
Deuteranopia (green-blind)
#093B76
Tritanopia (blue-blind)
#4A374B
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #512478;
/* rgb */ color: rgb(81, 36, 120);
/* oklch */ color: oklch(36.9% 0.138 305.1);
Tailwind
colors: {
  custom: {
    50: '#8562a0',
    500: '#512478',
    950: '#000000',
  },
}
SCSS
$custom: #512478;
$custom-light: #8562a0;
$custom-dark: #000000;
JSON
{
  "hex": "#512478",
  "rgb": {
    "r": 81,
    "g": 36,
    "b": 120
  },
  "hsl": {
    "h": 272.143,
    "s": 53.846,
    "l": 30.588
  },
  "oklch": {
    "l": 0.36863,
    "c": 0.138,
    "h": 305.1
  },
  "luminance": 0.04367
}

Semantic roles & 50–950 ramp

primary
#512478
secondary
#79AB4D
accent
#DD4B8F
background
#F8F6F9
surface
#F0EBF2
border
#CBC6CC
text
#0B050F
muted
#7C7A7E

Preview Lab

Preview with #512478

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

Preview Lab → · Contrast checker → · Palette generator →

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