#512DAB#512DAB

#512DAB is a dark, vivid violet. Relative luminance 0.066; OKLCH L 42.4% C 0.187 H 288.9°. Best body text is #FFFFFF at 9.08:1 contrast (WCAG AA passes).

Color values

HEX#512DAB
RGBrgb(81, 45, 171)
HSLhsl(257, 58%, 42%)
HSVhsv(257, 74%, 67%)
CMYKcmyk(52.6%, 73.7%, 0%, 32.9%)
CIE-LABlab(30.80, 46.87, -61.56)
CIE-LCHlch(30.80, 77.37, 307.29°)
OKLaboklab(42.42% 0.0605 -0.1769)
OKLCHoklch(42.42% 0.187 288.9)
XYZxyz(11.6803, 6.5658, 39.1721)
Luminance0.0657 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512DAB #87AB2D
analogous
#2D48AB #512DAB #902DAB
triadic
#512DAB #AB512D #2DAB51
tetradic
#512DAB #AB2D48 #87AB2D #2DAB90
square
#512DAB #AB2D48 #87AB2D #2DAB90
split-complementary
#512DAB #AB902D #48AB2D
monochromatic
#23144A #3A207B #512DAB #6E47CE #9477DB

Accessibility & contrast

On white

9.08
#512DAB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.31
#512DAB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512DAB
9.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512DAB#FFFFFF#000000##FFFFFF
##512DAB1.009.082.319.08
#FFFFFF9.081.0021.001.00
#0000002.3121.001.0021.00
##FFFFFF9.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BAF
Deuteranopia (green-blind)
#0045A9
Tritanopia (blue-blind)
#2F4F69
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #512dab;
/* rgb */ color: rgb(81, 45, 171);
/* oklch */ color: oklch(42.4% 0.187 288.9);
Tailwind
colors: {
  custom: {
    50: '#8b6ac5',
    500: '#512dab',
    950: '#000000',
  },
}
SCSS
$custom: #512dab;
$custom-light: #8b6ac5;
$custom-dark: #000000;
JSON
{
  "hex": "#512dab",
  "rgb": {
    "r": 81,
    "g": 45,
    "b": 171
  },
  "hsl": {
    "h": 257.143,
    "s": 58.333,
    "l": 42.353
  },
  "oklch": {
    "l": 0.42424,
    "c": 0.18697,
    "h": 288.9
  },
  "luminance": 0.06566
}

Semantic roles & 50–950 ramp

primary
#512DAB
secondary
#ACC371
accent
#E246B5
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0713
muted
#7E7A82

Preview Lab

Preview with #512DAB

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

Preview Lab → · Contrast checker → · Palette generator →

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