#512B9D#512B9D

#512B9D is a dark, vivid violet. Relative luminance 0.059; OKLCH L 40.9% C 0.173 H 292.3°. Best body text is #FFFFFF at 9.62:1 contrast (WCAG AA passes).

Color values

HEX#512B9D
RGBrgb(81, 43, 157)
HSLhsl(260, 57%, 39%)
HSVhsv(260, 73%, 62%)
CMYKcmyk(48.4%, 72.6%, 0%, 38.4%)
CIE-LABlab(29.19, 43.93, -55.74)
CIE-LCHlch(29.19, 70.97, 308.24°)
OKLaboklab(40.9% 0.0654 -0.1598)
OKLCHoklch(40.9% 0.173 292.3)
XYZxyz(10.3413, 5.9110, 32.4878)
Luminance0.0591 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512B9D #779D2B
analogous
#2B3E9D #512B9D #8A2B9D
triadic
#512B9D #9D512B #2B9D51
tetradic
#512B9D #9D2B3E #779D2B #2B9D8A
square
#512B9D #9D2B3E #779D2B #2B9D8A
split-complementary
#512B9D #9D8A2B #3E9D2B
monochromatic
#1F113D #381E6D #512B9D #6B3CCA #8F6CD7

Accessibility & contrast

On white

9.62
#512B9D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.18
#512B9D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512B9D
9.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512B9D#FFFFFF#000000##FFFFFF
##512B9D1.009.622.189.62
#FFFFFF9.621.0021.001.00
#0000002.1821.001.0021.00
##FFFFFF9.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046A0
Deuteranopia (green-blind)
#00429B
Tritanopia (blue-blind)
#394961
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #512b9d;
/* rgb */ color: rgb(81, 43, 157);
/* oklch */ color: oklch(40.9% 0.173 292.3);
Tailwind
colors: {
  custom: {
    50: '#8968bb',
    500: '#512b9d',
    950: '#000000',
  },
}
SCSS
$custom: #512b9d;
$custom-light: #8968bb;
$custom-dark: #000000;
JSON
{
  "hex": "#512b9d",
  "rgb": {
    "r": 81,
    "g": 43,
    "b": 157
  },
  "hsl": {
    "h": 260,
    "s": 57,
    "l": 39.216
  },
  "oklch": {
    "l": 0.40901,
    "c": 0.17269,
    "h": 292.3
  },
  "luminance": 0.05911
}

Semantic roles & 50–950 ramp

primary
#512B9D
secondary
#A0BD66
accent
#E048AD
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #512B9D

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

Preview Lab → · Contrast checker → · Palette generator →

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