#512E9D#512E9D

#512E9D is a dark, vivid violet. Relative luminance 0.061; OKLCH L 41.3% C 0.169 H 291.7°. Best body text is #FFFFFF at 9.43:1 contrast (WCAG AA passes).

Color values

HEX#512E9D
RGBrgb(81, 46, 157)
HSLhsl(259, 55%, 40%)
HSVhsv(259, 71%, 62%)
CMYKcmyk(48.4%, 70.7%, 0%, 38.4%)
CIE-LABlab(29.76, 42.34, -54.81)
CIE-LCHlch(29.76, 69.26, 307.69°)
OKLaboklab(41.31% 0.0626 -0.1571)
OKLCHoklch(41.31% 0.169 291.7)
XYZxyz(10.4544, 6.1373, 32.5255)
Luminance0.0614 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512E9D #7A9D2E
analogous
#2E429D #512E9D #892E9D
triadic
#512E9D #9D512E #2E9D51
tetradic
#512E9D #9D2E42 #7A9D2E #2E9D89
square
#512E9D #9D2E42 #7A9D2E #2E9D89
split-complementary
#512E9D #9D892E #429D2E
monochromatic
#20123E #39206E #512E9D #6B41C7 #9070D5

Accessibility & contrast

On white

9.43
#512E9D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.23
#512E9D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512E9D
9.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512E9D#FFFFFF#000000##FFFFFF
##512E9D1.009.432.239.43
#FFFFFF9.431.0021.001.00
#0000002.2321.001.0021.00
##FFFFFF9.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048A0
Deuteranopia (green-blind)
#00449B
Tritanopia (blue-blind)
#394A62
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #512e9d;
/* rgb */ color: rgb(81, 46, 157);
/* oklch */ color: oklch(41.3% 0.169 291.7);
Tailwind
colors: {
  custom: {
    50: '#896abb',
    500: '#512e9d',
    950: '#000000',
  },
}
SCSS
$custom: #512e9d;
$custom-light: #896abb;
$custom-dark: #000000;
JSON
{
  "hex": "#512e9d",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 157
  },
  "hsl": {
    "h": 258.919,
    "s": 54.68,
    "l": 39.804
  },
  "oklch": {
    "l": 0.41306,
    "c": 0.1691,
    "h": 291.7
  },
  "luminance": 0.06138
}

Semantic roles & 50–950 ramp

primary
#512E9D
secondary
#A3BD6A
accent
#DE4AAF
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #512E9D

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

Preview Lab → · Contrast checker → · Palette generator →

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