#512E8B#512E8B

#512E8B is a dark, vivid violet. Relative luminance 0.056; OKLCH L 39.8% C 0.147 H 296.4°. Best body text is #FFFFFF at 9.94:1 contrast (WCAG AA passes).

Color values

HEX#512E8B
RGBrgb(81, 46, 139)
HSLhsl(263, 50%, 36%)
HSVhsv(263, 67%, 55%)
CMYKcmyk(41.7%, 66.9%, 0%, 45.5%)
CIE-LABlab(28.29, 37.22, -46.13)
CIE-LCHlch(28.29, 59.28, 308.90°)
OKLaboklab(39.8% 0.0653 -0.1316)
OKLCHoklch(39.8% 0.147 296.4)
XYZxyz(9.0293, 5.5672, 25.0200)
Luminance0.0557 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512E8B #688B2E
analogous
#2E3A8B #512E8B #802E8B
triadic
#512E8B #8B512E #2E8B51
tetradic
#512E8B #8B2E3A #688B2E #2E8B80
square
#512E8B #8B2E3A #688B2E #2E8B80
split-complementary
#512E8B #8B802E #3A8B2E
monochromatic
#1B102F #361F5D #512E8B #6C3DB9 #8D67CD

Accessibility & contrast

On white

9.94
#512E8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512E8B
9.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512E8B#FFFFFF#000000##FFFFFF
##512E8B1.009.942.119.94
#FFFFFF9.941.0021.001.00
#0000002.1121.001.0021.00
##FFFFFF9.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00438E
Deuteranopia (green-blind)
#004189
Tritanopia (blue-blind)
#424458
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #512e8b;
/* rgb */ color: rgb(81, 46, 139);
/* oklch */ color: oklch(39.8% 0.147 296.4);
Tailwind
colors: {
  custom: {
    50: '#8769ae',
    500: '#512e8b',
    950: '#000000',
  },
}
SCSS
$custom: #512e8b;
$custom-light: #8769ae;
$custom-dark: #000000;
JSON
{
  "hex": "#512e8b",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 139
  },
  "hsl": {
    "h": 262.581,
    "s": 50.27,
    "l": 36.275
  },
  "oklch": {
    "l": 0.39799,
    "c": 0.14691,
    "h": 296.4
  },
  "luminance": 0.05567
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #512E8B

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

Preview Lab → · Contrast checker → · Palette generator →

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