#512A86#512A86

#512A86 is a dark, vivid violet. Relative luminance 0.051; OKLCH L 38.8% C 0.146 H 298.8°. Best body text is #FFFFFF at 10.37:1 contrast (WCAG AA passes).

Color values

HEX#512A86
RGBrgb(81, 42, 134)
HSLhsl(265, 52%, 35%)
HSVhsv(265, 69%, 53%)
CMYKcmyk(39.6%, 68.7%, 0%, 47.5%)
CIE-LABlab(27.09, 38.06, -44.97)
CIE-LCHlch(27.09, 58.91, 310.24°)
OKLaboklab(38.81% 0.0706 -0.1282)
OKLCHoklch(38.81% 0.146 298.8)
XYZxyz(8.5233, 5.1264, 23.0901)
Luminance0.0513 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512A86 #5F862A
analogous
#2A3186 #512A86 #7F2A86
triadic
#512A86 #86512A #2A8651
tetradic
#512A86 #862A31 #5F862A #2A867F
square
#512A86 #862A31 #5F862A #2A867F
split-complementary
#512A86 #867F2A #31862A
monochromatic
#190D29 #351B57 #512A86 #6D39B5 #8D5ECD

Accessibility & contrast

On white

10.37
#512A86 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.03
#512A86 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512A86
10.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512A86#FFFFFF#000000##FFFFFF
##512A861.0010.372.0310.37
#FFFFFF10.371.0021.001.00
#0000002.0321.001.0021.00
##FFFFFF10.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004089
Deuteranopia (green-blind)
#003F84
Tritanopia (blue-blind)
#453F54
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #512a86;
/* rgb */ color: rgb(81, 42, 134);
/* oklch */ color: oklch(38.8% 0.146 298.8);
Tailwind
colors: {
  custom: {
    50: '#8666aa',
    500: '#512a86',
    950: '#000000',
  },
}
SCSS
$custom: #512a86;
$custom-light: #8666aa;
$custom-dark: #000000;
JSON
{
  "hex": "#512a86",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 134
  },
  "hsl": {
    "h": 265.435,
    "s": 52.273,
    "l": 34.51
  },
  "oklch": {
    "l": 0.38812,
    "c": 0.1463,
    "h": 298.8
  },
  "luminance": 0.05126
}

Semantic roles & 50–950 ramp

primary
#512A86
secondary
#8DB25A
accent
#DC4C9F
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512A86

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

Preview Lab → · Contrast checker → · Palette generator →

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