#512D97#512D97

#512D97 is a dark, vivid violet. Relative luminance 0.059; OKLCH L 40.6% C 0.163 H 293.4°. Best body text is #FFFFFF at 9.67:1 contrast (WCAG AA passes).

Color values

HEX#512D97
RGBrgb(81, 45, 151)
HSLhsl(260, 54%, 38%)
HSVhsv(260, 70%, 59%)
CMYKcmyk(46.4%, 70.2%, 0%, 40.8%)
CIE-LABlab(29.06, 41.17, -52.28)
CIE-LCHlch(29.06, 66.55, 308.22°)
OKLaboklab(40.65% 0.0647 -0.1497)
OKLCHoklch(40.65% 0.163 293.4)
XYZxyz(9.9161, 5.8602, 29.8808)
Luminance0.0586 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512D97 #73972D
analogous
#2D3E97 #512D97 #862D97
triadic
#512D97 #97512D #2D9751
tetradic
#512D97 #972D3E #73972D #2D9786
square
#512D97 #972D3E #73972D #2D9786
split-complementary
#512D97 #97862D #3E972D
monochromatic
#1E1139 #381F68 #512D97 #6B3CC5 #8F6BD3

Accessibility & contrast

On white

9.67
#512D97 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.17
#512D97 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512D97
9.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512D97#FFFFFF#000000##FFFFFF
##512D971.009.672.179.67
#FFFFFF9.671.0021.001.00
#0000002.1721.001.0021.00
##FFFFFF9.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00469A
Deuteranopia (green-blind)
#004395
Tritanopia (blue-blind)
#3D475E
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #512d97;
/* rgb */ color: rgb(81, 45, 151);
/* oklch */ color: oklch(40.6% 0.163 293.4);
Tailwind
colors: {
  custom: {
    50: '#8869b6',
    500: '#512d97',
    950: '#000000',
  },
}
SCSS
$custom: #512d97;
$custom-light: #8869b6;
$custom-dark: #000000;
JSON
{
  "hex": "#512d97",
  "rgb": {
    "r": 81,
    "g": 45,
    "b": 151
  },
  "hsl": {
    "h": 260.377,
    "s": 54.082,
    "l": 38.431
  },
  "oklch": {
    "l": 0.4065,
    "c": 0.16305,
    "h": 293.4
  },
  "luminance": 0.0586
}

Semantic roles & 50–950 ramp

primary
#512D97
secondary
#9DBA66
accent
#DD4AAB
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512D97

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

Preview Lab → · Contrast checker → · Palette generator →

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