#512A9D#512A9D

#512A9D is a dark, vivid violet. Relative luminance 0.058; OKLCH L 40.8% C 0.174 H 292.4°. Best body text is #FFFFFF at 9.69:1 contrast (WCAG AA passes).

Color values

HEX#512A9D
RGBrgb(81, 42, 157)
HSLhsl(260, 58%, 39%)
HSVhsv(260, 73%, 62%)
CMYKcmyk(48.4%, 73.2%, 0%, 38.4%)
CIE-LABlab(29.00, 44.44, -56.04)
CIE-LCHlch(29.00, 71.52, 308.42°)
OKLaboklab(40.77% 0.0664 -0.1607)
OKLCHoklch(40.77% 0.174 292.4)
XYZxyz(10.3054, 5.8392, 32.4759)
Luminance0.0584 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512A9D #769D2A
analogous
#2A3D9D #512A9D #8B2A9D
triadic
#512A9D #9D512A #2A9D51
tetradic
#512A9D #9D2A3D #769D2A #2A9D8B
square
#512A9D #9D2A3D #769D2A #2A9D8B
split-complementary
#512A9D #9D8B2A #3D9D2A
monochromatic
#1F103C #381D6D #512A9D #6B3ACA #8F6AD7

Accessibility & contrast

On white

9.69
#512A9D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.17
#512A9D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512A9D
9.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512A9D#FFFFFF#000000##FFFFFF
##512A9D1.009.692.179.69
#FFFFFF9.691.0021.001.00
#0000002.1721.001.0021.00
##FFFFFF9.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046A0
Deuteranopia (green-blind)
#00429B
Tritanopia (blue-blind)
#394861
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #512a9d;
/* rgb */ color: rgb(81, 42, 157);
/* oklch */ color: oklch(40.8% 0.174 292.4);
Tailwind
colors: {
  custom: {
    50: '#8967bb',
    500: '#512a9d',
    950: '#000000',
  },
}
SCSS
$custom: #512a9d;
$custom-light: #8967bb;
$custom-dark: #000000;
JSON
{
  "hex": "#512a9d",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 157
  },
  "hsl": {
    "h": 260.348,
    "s": 57.789,
    "l": 39.02
  },
  "oklch": {
    "l": 0.40771,
    "c": 0.17386,
    "h": 292.4
  },
  "luminance": 0.0584
}

Semantic roles & 50–950 ramp

primary
#512A9D
secondary
#A0BE65
accent
#E147AD
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #512A9D

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

Preview Lab → · Contrast checker → · Palette generator →

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