#512AA1#512AA1

#512AA1 is a dark, vivid violet. Relative luminance 0.060; OKLCH L 41.1% C 0.179 H 291.5°. Best body text is #FFFFFF at 9.56:1 contrast (WCAG AA passes).

Color values

HEX#512AA1
RGBrgb(81, 42, 161)
HSLhsl(260, 59%, 40%)
HSVhsv(260, 74%, 63%)
CMYKcmyk(49.7%, 73.9%, 0%, 36.9%)
CIE-LABlab(29.36, 45.56, -57.89)
CIE-LCHlch(29.36, 73.67, 308.21°)
OKLaboklab(41.13% 0.0655 -0.1661)
OKLCHoklch(41.13% 0.179 291.5)
XYZxyz(10.6525, 5.9781, 34.3039)
Luminance0.0598 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512AA1 #7AA12A
analogous
#2A3EA1 #512AA1 #8D2AA1
triadic
#512AA1 #A1512A #2AA151
tetradic
#512AA1 #A12A3E #7AA12A #2AA18D
square
#512AA1 #A12A3E #7AA12A #2AA18D
split-complementary
#512AA1 #A18D2A #3EA12A
monochromatic
#201140 #391D70 #512AA1 #6B3CCC #906DD9

Accessibility & contrast

On white

9.56
#512AA1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.20
#512AA1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512AA1
9.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512AA1#FFFFFF#000000##FFFFFF
##512AA11.009.562.209.56
#FFFFFF9.561.0021.001.00
#0000002.2021.001.0021.00
##FFFFFF9.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047A4
Deuteranopia (green-blind)
#00439F
Tritanopia (blue-blind)
#374A63
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #512aa1;
/* rgb */ color: rgb(81, 42, 161);
/* oklch */ color: oklch(41.1% 0.179 291.5);
Tailwind
colors: {
  custom: {
    50: '#8a67be',
    500: '#512aa1',
    950: '#000000',
  },
}
SCSS
$custom: #512aa1;
$custom-light: #8a67be;
$custom-dark: #000000;
JSON
{
  "hex": "#512aa1",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 161
  },
  "hsl": {
    "h": 259.664,
    "s": 58.621,
    "l": 39.804
  },
  "oklch": {
    "l": 0.4113,
    "c": 0.17855,
    "h": 291.5
  },
  "luminance": 0.05978
}

Semantic roles & 50–950 ramp

primary
#512AA1
secondary
#A3C067
accent
#E246AF
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0D0612
muted
#7D7A81

Preview Lab

Preview with #512AA1

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

Preview Lab → · Contrast checker → · Palette generator →

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