#512D7A#512D7A

#512D7A is a dark, vivid violet. Relative luminance 0.050; OKLCH L 38.3% C 0.127 H 302.3°. Best body text is #FFFFFF at 10.47:1 contrast (WCAG AA passes).

Color values

HEX#512D7A
RGBrgb(81, 45, 122)
HSLhsl(268, 46%, 33%)
HSVhsv(268, 63%, 48%)
CMYKcmyk(33.6%, 63.1%, 0%, 52.2%)
CIE-LABlab(26.82, 33.10, -37.86)
CIE-LCHlch(26.82, 50.29, 311.16°)
OKLaboklab(38.34% 0.0679 -0.1073)
OKLCHoklch(38.34% 0.127 302.3)
XYZxyz(7.8438, 5.0312, 18.9665)
Luminance0.0503 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512D7A #567A2D
analogous
#2D2F7A #512D7A #772D7A
triadic
#512D7A #7A512D #2D7A51
tetradic
#512D7A #7A2D2F #567A2D #2D7A77
square
#512D7A #7A2D2F #567A2D #2D7A77
split-complementary
#512D7A #7A772D #2F7A2D
monochromatic
#160C21 #331D4D #512D7A #6F3DA7 #8D5EC4

Accessibility & contrast

On white

10.47
#512D7A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.01
#512D7A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512D7A
10.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512D7A#FFFFFF#000000##FFFFFF
##512D7A1.0010.472.0110.47
#FFFFFF10.471.0021.001.00
#0000002.0121.001.0021.00
##FFFFFF10.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#013F7C
Deuteranopia (green-blind)
#173F78
Tritanopia (blue-blind)
#493D4F
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #512d7a;
/* rgb */ color: rgb(81, 45, 122);
/* oklch */ color: oklch(38.3% 0.127 302.3);
Tailwind
colors: {
  custom: {
    50: '#8568a1',
    500: '#512d7a',
    950: '#000000',
  },
}
SCSS
$custom: #512d7a;
$custom-light: #8568a1;
$custom-dark: #000000;
JSON
{
  "hex": "#512d7a",
  "rgb": {
    "r": 81,
    "g": 45,
    "b": 122
  },
  "hsl": {
    "h": 268.052,
    "s": 46.108,
    "l": 32.745
  },
  "oklch": {
    "l": 0.38335,
    "c": 0.12695,
    "h": 302.3
  },
  "luminance": 0.05031
}

Semantic roles & 50–950 ramp

primary
#512D7A
secondary
#84AA59
accent
#D65298
background
#F8F6FA
surface
#EFEBF3
border
#CAC6CD
text
#0B060F
muted
#7C7A7F

Preview Lab

Preview with #512D7A

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

Preview Lab → · Contrast checker → · Palette generator →

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