#512D82#512D82

#512D82 is a dark, vivid violet. Relative luminance 0.052; OKLCH L 38.9% C 0.137 H 299.5°. Best body text is #FFFFFF at 10.26:1 contrast (WCAG AA passes).

Color values

HEX#512D82
RGBrgb(81, 45, 130)
HSLhsl(265, 49%, 34%)
HSVhsv(265, 65%, 51%)
CMYKcmyk(37.7%, 65.4%, 0%, 49%)
CIE-LABlab(27.40, 35.29, -41.97)
CIE-LCHlch(27.40, 54.83, 310.06°)
OKLaboklab(38.94% 0.0674 -0.1193)
OKLCHoklch(38.94% 0.137 299.5)
XYZxyz(8.3600, 5.2377, 21.6853)
Luminance0.0524 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512D82 #5E822D
analogous
#2D3482 #512D82 #7C2D82
triadic
#512D82 #82512D #2D8251
tetradic
#512D82 #822D34 #5E822D #2D827C
square
#512D82 #822D34 #5E822D #2D827C
split-complementary
#512D82 #827C2D #34822D
monochromatic
#180E27 #351D55 #512D82 #6D3DAF #8D61C8

Accessibility & contrast

On white

10.26
#512D82 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.05
#512D82 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512D82
10.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512D82#FFFFFF#000000##FFFFFF
##512D821.0010.262.0510.26
#FFFFFF10.261.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004185
Deuteranopia (green-blind)
#064080
Tritanopia (blue-blind)
#464053
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #512d82;
/* rgb */ color: rgb(81, 45, 130);
/* oklch */ color: oklch(38.9% 0.137 299.5);
Tailwind
colors: {
  custom: {
    50: '#8668a7',
    500: '#512d82',
    950: '#000000',
  },
}
SCSS
$custom: #512d82;
$custom-light: #8668a7;
$custom-dark: #000000;
JSON
{
  "hex": "#512d82",
  "rgb": {
    "r": 81,
    "g": 45,
    "b": 130
  },
  "hsl": {
    "h": 265.412,
    "s": 48.571,
    "l": 34.314
  },
  "oklch": {
    "l": 0.38939,
    "c": 0.13706,
    "h": 299.5
  },
  "luminance": 0.05238
}

Semantic roles & 50–950 ramp

primary
#512D82
secondary
#8CAF5C
accent
#D8509E
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0B060F
muted
#7C7A7F

Preview Lab

Preview with #512D82

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

Preview Lab → · Contrast checker → · Palette generator →

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