#512A87#512A87

#512A87 is a dark, vivid violet. Relative luminance 0.052; OKLCH L 38.9% C 0.148 H 298.5°. Best body text is #FFFFFF at 10.34:1 contrast (WCAG AA passes).

Color values

HEX#512A87
RGBrgb(81, 42, 135)
HSLhsl(265, 53%, 35%)
HSVhsv(265, 69%, 53%)
CMYKcmyk(40%, 68.9%, 0%, 47.1%)
CIE-LABlab(27.17, 38.33, -45.47)
CIE-LCHlch(27.17, 59.47, 310.13°)
OKLaboklab(38.89% 0.0704 -0.1296)
OKLCHoklch(38.89% 0.148 298.5)
XYZxyz(8.5934, 5.1544, 23.4591)
Luminance0.0515 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512A87 #60872A
analogous
#2A3287 #512A87 #7F2A87
triadic
#512A87 #87512A #2A8751
tetradic
#512A87 #872A32 #60872A #2A877F
square
#512A87 #872A32 #60872A #2A877F
split-complementary
#512A87 #877F2A #32872A
monochromatic
#190D2A #351B58 #512A87 #6D39B6 #8D5ECD

Accessibility & contrast

On white

10.34
#512A87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512A87
10.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512A87#FFFFFF#000000##FFFFFF
##512A871.0010.342.0310.34
#FFFFFF10.341.0021.001.00
#0000002.0321.001.0021.00
##FFFFFF10.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00408A
Deuteranopia (green-blind)
#003F85
Tritanopia (blue-blind)
#444055
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #512a87;
/* rgb */ color: rgb(81, 42, 135);
/* oklch */ color: oklch(38.9% 0.148 298.5);
Tailwind
colors: {
  custom: {
    50: '#8766ab',
    500: '#512a87',
    950: '#000000',
  },
}
SCSS
$custom: #512a87;
$custom-light: #8766ab;
$custom-dark: #000000;
JSON
{
  "hex": "#512a87",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 135
  },
  "hsl": {
    "h": 265.161,
    "s": 52.542,
    "l": 34.706
  },
  "oklch": {
    "l": 0.38893,
    "c": 0.14752,
    "h": 298.5
  },
  "luminance": 0.05155
}

Semantic roles & 50–950 ramp

primary
#512A87
secondary
#8EB35A
accent
#DC4CA0
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512A87

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

Preview Lab → · Contrast checker → · Palette generator →

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