#512AA6#512AA6

#512AA6 is a dark, vivid violet. Relative luminance 0.062; OKLCH L 41.6% C 0.184 H 290.4°. Best body text is #FFFFFF at 9.41:1 contrast (WCAG AA passes).

Color values

HEX#512AA6
RGBrgb(81, 42, 166)
HSLhsl(259, 60%, 41%)
HSVhsv(259, 75%, 65%)
CMYKcmyk(51.2%, 74.7%, 0%, 34.9%)
CIE-LABlab(29.81, 46.97, -60.17)
CIE-LCHlch(29.81, 76.33, 307.97°)
OKLaboklab(41.59% 0.0643 -0.1728)
OKLCHoklch(41.59% 0.184 290.4)
XYZxyz(11.1023, 6.1580, 36.6726)
Luminance0.0616 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512AA6 #7FA62A
analogous
#2A41A6 #512AA6 #8F2AA6
triadic
#512AA6 #A6512A #2AA651
tetradic
#512AA6 #A62A41 #7FA62A #2AA68F
square
#512AA6 #A62A41 #7FA62A #2AA68F
split-complementary
#512AA6 #A68F2A #41A62A
monochromatic
#211144 #391E75 #512AA6 #6C3FCE #9170DB

Accessibility & contrast

On white

9.41
#512AA6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.23
#512AA6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512AA6
9.41:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512AA6#FFFFFF#000000##FFFFFF
##512AA61.009.412.239.41
#FFFFFF9.411.0021.001.00
#0000002.2321.001.0021.00
##FFFFFF9.411.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048AA
Deuteranopia (green-blind)
#0043A4
Tritanopia (blue-blind)
#334C66
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #512aa6;
/* rgb */ color: rgb(81, 42, 166);
/* oklch */ color: oklch(41.6% 0.184 290.4);
Tailwind
colors: {
  custom: {
    50: '#8b68c1',
    500: '#512aa6',
    950: '#000000',
  },
}
SCSS
$custom: #512aa6;
$custom-light: #8b68c1;
$custom-dark: #000000;
JSON
{
  "hex": "#512aa6",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 166
  },
  "hsl": {
    "h": 258.871,
    "s": 59.615,
    "l": 40.784
  },
  "oklch": {
    "l": 0.41586,
    "c": 0.18439,
    "h": 290.4
  },
  "luminance": 0.06158
}

Semantic roles & 50–950 ramp

primary
#512AA6
secondary
#A6C26A
accent
#E345B1
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0612
muted
#7E7A81

Preview Lab

Preview with #512AA6

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

Preview Lab → · Contrast checker → · Palette generator →

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