#512D9A#512D9A

#512D9A is a dark, vivid violet. Relative luminance 0.060; OKLCH L 40.9% C 0.167 H 292.6°. Best body text is #FFFFFF at 9.58:1 contrast (WCAG AA passes).

Color values

HEX#512D9A
RGBrgb(81, 45, 154)
HSLhsl(260, 55%, 39%)
HSVhsv(260, 71%, 60%)
CMYKcmyk(47.4%, 70.8%, 0%, 39.6%)
CIE-LABlab(29.31, 42.02, -53.71)
CIE-LCHlch(29.31, 68.19, 308.04°)
OKLaboklab(40.91% 0.0641 -0.1539)
OKLCHoklch(40.91% 0.167 292.6)
XYZxyz(10.1628, 5.9589, 31.1803)
Luminance0.0596 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512D9A #769A2D
analogous
#2D3F9A #512D9A #882D9A
triadic
#512D9A #9A512D #2D9A51
tetradic
#512D9A #9A2D3F #769A2D #2D9A88
square
#512D9A #9A2D3F #769A2D #2D9A88
split-complementary
#512D9A #9A882D #3F9A2D
monochromatic
#1F113B #381F6B #512D9A #6B3EC7 #8F6DD4

Accessibility & contrast

On white

9.58
#512D9A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.19
#512D9A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512D9A
9.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512D9A#FFFFFF#000000##FFFFFF
##512D9A1.009.582.199.58
#FFFFFF9.581.0021.001.00
#0000002.1921.001.0021.00
##FFFFFF9.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00469D
Deuteranopia (green-blind)
#004398
Tritanopia (blue-blind)
#3B4860
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #512d9a;
/* rgb */ color: rgb(81, 45, 154);
/* oklch */ color: oklch(40.9% 0.167 292.6);
Tailwind
colors: {
  custom: {
    50: '#8969b9',
    500: '#512d9a',
    950: '#000000',
  },
}
SCSS
$custom: #512d9a;
$custom-light: #8969b9;
$custom-dark: #000000;
JSON
{
  "hex": "#512d9a",
  "rgb": {
    "r": 81,
    "g": 45,
    "b": 154
  },
  "hsl": {
    "h": 259.817,
    "s": 54.774,
    "l": 39.02
  },
  "oklch": {
    "l": 0.40908,
    "c": 0.16669,
    "h": 292.6
  },
  "luminance": 0.05959
}

Semantic roles & 50–950 ramp

primary
#512D9A
secondary
#A0BB67
accent
#DE4AAD
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512D9A

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

Preview Lab → · Contrast checker → · Palette generator →

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