#512E8A#512E8A

#512E8A is a dark, vivid violet. Relative luminance 0.055; OKLCH L 39.7% C 0.146 H 296.7°. Best body text is #FFFFFF at 9.96:1 contrast (WCAG AA passes).

Color values

HEX#512E8A
RGBrgb(81, 46, 138)
HSLhsl(263, 50%, 36%)
HSVhsv(263, 67%, 54%)
CMYKcmyk(41.3%, 66.7%, 0%, 45.9%)
CIE-LABlab(28.22, 36.94, -45.64)
CIE-LCHlch(28.22, 58.72, 308.99°)
OKLaboklab(39.72% 0.0654 -0.1301)
OKLCHoklch(39.72% 0.146 296.7)
XYZxyz(8.9566, 5.5381, 24.6369)
Luminance0.0554 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512E8A #678A2E
analogous
#2E398A #512E8A #7F2E8A
triadic
#512E8A #8A512E #2E8A51
tetradic
#512E8A #8A2E39 #678A2E #2E8A7F
square
#512E8A #8A2E39 #678A2E #2E8A7F
split-complementary
#512E8A #8A7F2E #398A2E
monochromatic
#1B0F2E #361F5C #512E8A #6C3DB8 #8D66CC

Accessibility & contrast

On white

9.96
#512E8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.11
#512E8A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512E8A
9.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512E8A#FFFFFF#000000##FFFFFF
##512E8A1.009.962.119.96
#FFFFFF9.961.0021.001.00
#0000002.1121.001.0021.00
##FFFFFF9.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00438D
Deuteranopia (green-blind)
#004188
Tritanopia (blue-blind)
#434358
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #512e8a;
/* rgb */ color: rgb(81, 46, 138);
/* oklch */ color: oklch(39.7% 0.146 296.7);
Tailwind
colors: {
  custom: {
    50: '#8769ad',
    500: '#512e8a',
    950: '#000000',
  },
}
SCSS
$custom: #512e8a;
$custom-light: #8769ad;
$custom-dark: #000000;
JSON
{
  "hex": "#512e8a",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 138
  },
  "hsl": {
    "h": 262.826,
    "s": 50,
    "l": 36.078
  },
  "oklch": {
    "l": 0.39719,
    "c": 0.14567,
    "h": 296.7
  },
  "luminance": 0.05538
}

Semantic roles & 50–950 ramp

primary
#512E8A
secondary
#94B361
accent
#DA4EA5
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512E8A

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

Preview Lab → · Contrast checker → · Palette generator →

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