#512E9B#512E9B

#512E9B is a dark, vivid violet. Relative luminance 0.061; OKLCH L 41.1% C 0.167 H 292.2°. Best body text is #FFFFFF at 9.49:1 contrast (WCAG AA passes).

Color values

HEX#512E9B
RGBrgb(81, 46, 155)
HSLhsl(259, 54%, 39%)
HSVhsv(259, 70%, 61%)
CMYKcmyk(47.7%, 70.3%, 0%, 39.2%)
CIE-LABlab(29.59, 41.77, -53.86)
CIE-LCHlch(29.59, 68.16, 307.79°)
OKLaboklab(41.13% 0.0629 -0.1543)
OKLCHoklch(41.13% 0.167 292.2)
XYZxyz(10.2851, 6.0695, 31.6336)
Luminance0.0607 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512E9B #789B2E
analogous
#2E429B #512E9B #882E9B
triadic
#512E9B #9B512E #2E9B51
tetradic
#512E9B #9B2E42 #789B2E #2E9B88
square
#512E9B #9B2E42 #789B2E #2E9B88
split-complementary
#512E9B #9B882E #429B2E
monochromatic
#20123D #38206C #512E9B #6B40C6 #906FD4

Accessibility & contrast

On white

9.49
#512E9B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.21
#512E9B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512E9B
9.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512E9B#FFFFFF#000000##FFFFFF
##512E9B1.009.492.219.49
#FFFFFF9.491.0021.001.00
#0000002.2121.001.0021.00
##FFFFFF9.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00479E
Deuteranopia (green-blind)
#004399
Tritanopia (blue-blind)
#3A4961
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #512e9b;
/* rgb */ color: rgb(81, 46, 155);
/* oklch */ color: oklch(41.1% 0.167 292.2);
Tailwind
colors: {
  custom: {
    50: '#8969b9',
    500: '#512e9b',
    950: '#000000',
  },
}
SCSS
$custom: #512e9b;
$custom-light: #8969b9;
$custom-dark: #000000;
JSON
{
  "hex": "#512e9b",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 155
  },
  "hsl": {
    "h": 259.266,
    "s": 54.229,
    "l": 39.412
  },
  "oklch": {
    "l": 0.41133,
    "c": 0.16667,
    "h": 292.2
  },
  "luminance": 0.0607
}

Semantic roles & 50–950 ramp

primary
#512E9B
secondary
#A1BC69
accent
#DE4AAE
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #512E9B

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

Preview Lab → · Contrast checker → · Palette generator →

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