#512AAA#512AAA

#512AAA is a dark, vivid violet. Relative luminance 0.063; OKLCH L 42.0% C 0.189 H 289.5°. Best body text is #FFFFFF at 9.29:1 contrast (WCAG AA passes).

Color values

HEX#512AAA
RGBrgb(81, 42, 170)
HSLhsl(258, 60%, 42%)
HSVhsv(258, 75%, 67%)
CMYKcmyk(52.4%, 75.3%, 0%, 33.3%)
CIE-LABlab(30.17, 48.09, -61.98)
CIE-LCHlch(30.17, 78.45, 307.81°)
OKLaboklab(41.96% 0.0632 -0.1781)
OKLCHoklch(41.96% 0.189 289.5)
XYZxyz(11.4749, 6.3070, 38.6352)
Luminance0.0631 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512AAA #83AA2A
analogous
#2A43AA #512AAA #912AAA
triadic
#512AAA #AA512A #2AAA51
tetradic
#512AAA #AA2A43 #83AA2A #2AAA91
square
#512AAA #AA2A43 #83AA2A #2AAA91
split-complementary
#512AAA #AA912A #43AA2A
monochromatic
#221248 #3A1E79 #512AAA #6D41D0 #9272DC

Accessibility & contrast

On white

9.29
#512AAA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.26
#512AAA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512AAA
9.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512AAA#FFFFFF#000000##FFFFFF
##512AAA1.009.292.269.29
#FFFFFF9.291.0021.001.00
#0000002.2621.001.0021.00
##FFFFFF9.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0049AE
Deuteranopia (green-blind)
#0044A8
Tritanopia (blue-blind)
#304D68
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #512aaa;
/* rgb */ color: rgb(81, 42, 170);
/* oklch */ color: oklch(42.0% 0.189 289.5);
Tailwind
colors: {
  custom: {
    50: '#8b68c4',
    500: '#512aaa',
    950: '#000000',
  },
}
SCSS
$custom: #512aaa;
$custom-light: #8b68c4;
$custom-dark: #000000;
JSON
{
  "hex": "#512aaa",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 170
  },
  "hsl": {
    "h": 258.281,
    "s": 60.377,
    "l": 41.569
  },
  "oklch": {
    "l": 0.41957,
    "c": 0.18901,
    "h": 289.5
  },
  "luminance": 0.06308
}

Semantic roles & 50–950 ramp

primary
#512AAA
secondary
#A9C36C
accent
#E444B3
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0613
muted
#7E7A82

Preview Lab

Preview with #512AAA

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

Preview Lab → · Contrast checker → · Palette generator →

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