#512E87#512E87

#512E87 is a dark, vivid violet. Relative luminance 0.055; OKLCH L 39.5% C 0.142 H 297.6°. Best body text is #FFFFFF at 10.04:1 contrast (WCAG AA passes).

Color values

HEX#512E87
RGBrgb(81, 46, 135)
HSLhsl(264, 49%, 35%)
HSVhsv(264, 66%, 53%)
CMYKcmyk(40%, 65.9%, 0%, 47.1%)
CIE-LABlab(27.99, 36.10, -44.14)
CIE-LCHlch(27.99, 57.03, 309.28°)
OKLaboklab(39.48% 0.0657 -0.1257)
OKLCHoklch(39.48% 0.142 297.6)
XYZxyz(8.7424, 5.4525, 23.5088)
Luminance0.0545 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512E87 #64872E
analogous
#2E3787 #512E87 #7D2E87
triadic
#512E87 #87512E #2E8751
tetradic
#512E87 #872E37 #64872E #2E877D
square
#512E87 #872E37 #64872E #2E877D
split-complementary
#512E87 #877D2E #37872E
monochromatic
#1A0F2C #361E59 #512E87 #6C3EB5 #8D65CA

Accessibility & contrast

On white

10.04
#512E87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#512E87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512E87
10.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512E87#FFFFFF#000000##FFFFFF
##512E871.0010.042.0910.04
#FFFFFF10.041.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00428A
Deuteranopia (green-blind)
#004185
Tritanopia (blue-blind)
#444256
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #512e87;
/* rgb */ color: rgb(81, 46, 135);
/* oklch */ color: oklch(39.5% 0.142 297.6);
Tailwind
colors: {
  custom: {
    50: '#8669ab',
    500: '#512e87',
    950: '#000000',
  },
}
SCSS
$custom: #512e87;
$custom-light: #8669ab;
$custom-dark: #000000;
JSON
{
  "hex": "#512e87",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 135
  },
  "hsl": {
    "h": 263.596,
    "s": 49.171,
    "l": 35.49
  },
  "oklch": {
    "l": 0.39481,
    "c": 0.1419,
    "h": 297.6
  },
  "luminance": 0.05453
}

Semantic roles & 50–950 ramp

primary
#512E87
secondary
#91B160
accent
#D94FA3
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512E87

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

Preview Lab → · Contrast checker → · Palette generator →

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