#512A9B#512A9B

#512A9B is a dark, vivid violet. Relative luminance 0.058; OKLCH L 40.6% C 0.172 H 292.9°. Best body text is #FFFFFF at 9.75:1 contrast (WCAG AA passes).

Color values

HEX#512A9B
RGBrgb(81, 42, 155)
HSLhsl(261, 57%, 39%)
HSVhsv(261, 73%, 61%)
CMYKcmyk(47.7%, 72.9%, 0%, 39.2%)
CIE-LABlab(28.83, 43.88, -55.10)
CIE-LCHlch(28.83, 70.44, 308.53°)
OKLaboklab(40.59% 0.0668 -0.1579)
OKLCHoklch(40.59% 0.172 292.9)
XYZxyz(10.1361, 5.7715, 31.5839)
Luminance0.0577 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512A9B #749B2A
analogous
#2A3B9B #512A9B #892A9B
triadic
#512A9B #9B512A #2A9B51
tetradic
#512A9B #9B2A3B #749B2A #2A9B89
square
#512A9B #9B2A3B #749B2A #2A9B89
split-complementary
#512A9B #9B892A #3B9B2A
monochromatic
#1F103B #381D6B #512A9B #6B39C9 #8F69D6

Accessibility & contrast

On white

9.75
#512A9B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.15
#512A9B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512A9B
9.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512A9B#FFFFFF#000000##FFFFFF
##512A9B1.009.752.159.75
#FFFFFF9.751.0021.001.00
#0000002.1521.001.0021.00
##FFFFFF9.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00459E
Deuteranopia (green-blind)
#004299
Tritanopia (blue-blind)
#3A4760
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #512a9b;
/* rgb */ color: rgb(81, 42, 155);
/* oklch */ color: oklch(40.6% 0.172 292.9);
Tailwind
colors: {
  custom: {
    50: '#8967b9',
    500: '#512a9b',
    950: '#000000',
  },
}
SCSS
$custom: #512a9b;
$custom-light: #8967b9;
$custom-dark: #000000;
JSON
{
  "hex": "#512a9b",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 155
  },
  "hsl": {
    "h": 260.708,
    "s": 57.36,
    "l": 38.627
  },
  "oklch": {
    "l": 0.40593,
    "c": 0.1715,
    "h": 292.9
  },
  "luminance": 0.05772
}

Semantic roles & 50–950 ramp

primary
#512A9B
secondary
#9EBD64
accent
#E147AC
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #512A9B

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

Preview Lab → · Contrast checker → · Palette generator →

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