#512C87#512C87

#512C87 is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.2% C 0.145 H 298.1°. Best body text is #FFFFFF at 10.19:1 contrast (WCAG AA passes).

Color values

HEX#512C87
RGBrgb(81, 44, 135)
HSLhsl(264, 51%, 35%)
HSVhsv(264, 67%, 53%)
CMYKcmyk(40%, 67.4%, 0%, 47.1%)
CIE-LABlab(27.57, 37.23, -44.82)
CIE-LCHlch(27.57, 58.26, 309.72°)
OKLaboklab(39.18% 0.0681 -0.1277)
OKLCHoklch(39.18% 0.145 298.1)
XYZxyz(8.6661, 5.2998, 23.4834)
Luminance0.0530 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512C87 #62872C
analogous
#2C3487 #512C87 #7F2C87
triadic
#512C87 #87512C #2C8751
tetradic
#512C87 #872C34 #62872C #2C877F
square
#512C87 #872C34 #62872C #2C877F
split-complementary
#512C87 #877F2C #34872C
monochromatic
#1A0E2B #351D59 #512C87 #6D3BB5 #8D62CC

Accessibility & contrast

On white

10.19
#512C87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.06
#512C87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512C87
10.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512C87#FFFFFF#000000##FFFFFF
##512C871.0010.192.0610.19
#FFFFFF10.191.0021.001.00
#0000002.0621.001.0021.00
##FFFFFF10.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00418A
Deuteranopia (green-blind)
#004085
Tritanopia (blue-blind)
#444155
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #512c87;
/* rgb */ color: rgb(81, 44, 135);
/* oklch */ color: oklch(39.2% 0.145 298.1);
Tailwind
colors: {
  custom: {
    50: '#8668ab',
    500: '#512c87',
    950: '#000000',
  },
}
SCSS
$custom: #512c87;
$custom-light: #8668ab;
$custom-dark: #000000;
JSON
{
  "hex": "#512c87",
  "rgb": {
    "r": 81,
    "g": 44,
    "b": 135
  },
  "hsl": {
    "h": 264.396,
    "s": 50.838,
    "l": 35.098
  },
  "oklch": {
    "l": 0.39182,
    "c": 0.14474,
    "h": 298.1
  },
  "luminance": 0.053
}

Semantic roles & 50–950 ramp

primary
#512C87
secondary
#8FB25D
accent
#DA4DA1
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512C87

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

Preview Lab → · Contrast checker → · Palette generator →

#512C87 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva