#512587#512587

#512587 is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.2% C 0.154 H 299.5°. Best body text is #FFFFFF at 10.69:1 contrast (WCAG AA passes).

Color values

HEX#512587
RGBrgb(81, 37, 135)
HSLhsl(267, 57%, 34%)
HSVhsv(267, 73%, 53%)
CMYKcmyk(40%, 72.6%, 0%, 47.1%)
CIE-LABlab(26.22, 40.97, -47.01)
CIE-LCHlch(26.22, 62.36, 311.07°)
OKLaboklab(38.21% 0.0759 -0.1341)
OKLCHoklch(38.21% 0.154 299.5)
XYZxyz(8.4270, 4.8216, 23.4037)
Luminance0.0482 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512587 #5B8725
analogous
#252A87 #512587 #822587
triadic
#512587 #875125 #258751
tetradic
#512587 #87252A #5B8725 #258782
square
#512587 #87252A #5B8725 #258782
split-complementary
#512587 #878225 #2A8725
monochromatic
#170B27 #341857 #512587 #6E32B7 #8D56D1

Accessibility & contrast

On white

10.69
#512587 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#512587 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512587
10.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512587#FFFFFF#000000##FFFFFF
##5125871.0010.691.9610.69
#FFFFFF10.691.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E8A
Deuteranopia (green-blind)
#003D85
Tritanopia (blue-blind)
#443D53
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #512587;
/* rgb */ color: rgb(81, 37, 135);
/* oklch */ color: oklch(38.2% 0.154 299.5);
Tailwind
colors: {
  custom: {
    50: '#8763ab',
    500: '#512587',
    950: '#000000',
  },
}
SCSS
$custom: #512587;
$custom-light: #8763ab;
$custom-dark: #000000;
JSON
{
  "hex": "#512587",
  "rgb": {
    "r": 81,
    "g": 37,
    "b": 135
  },
  "hsl": {
    "h": 266.939,
    "s": 56.977,
    "l": 33.725
  },
  "oklch": {
    "l": 0.38215,
    "c": 0.15414,
    "h": 299.5
  },
  "luminance": 0.04822
}

Semantic roles & 50–950 ramp

primary
#512587
secondary
#89B553
accent
#E0489C
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0510
muted
#7D7A7F

Preview Lab

Preview with #512587

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

Preview Lab → · Contrast checker → · Palette generator →

#512587 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva