#512BAB#512BAB

#512BAB is a dark, vivid violet. Relative luminance 0.064; OKLCH L 42.2% C 0.189 H 289.2°. Best body text is #FFFFFF at 9.20:1 contrast (WCAG AA passes).

Color values

HEX#512BAB
RGBrgb(81, 43, 171)
HSLhsl(258, 60%, 42%)
HSVhsv(258, 75%, 67%)
CMYKcmyk(52.6%, 74.9%, 0%, 32.9%)
CIE-LABlab(30.44, 47.88, -62.14)
CIE-LCHlch(30.44, 78.45, 307.61°)
OKLaboklab(42.17% 0.0622 -0.1786)
OKLCHoklch(42.17% 0.189 289.2)
XYZxyz(11.6058, 6.4168, 39.1472)
Luminance0.0642 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512BAB #85AB2B
analogous
#2B45AB #512BAB #912BAB
triadic
#512BAB #AB512B #2BAB51
tetradic
#512BAB #AB2B45 #85AB2B #2BAB91
square
#512BAB #AB2B45 #85AB2B #2BAB91
split-complementary
#512BAB #AB912B #45AB2B
monochromatic
#231249 #3A1F7A #512BAB #6D43D0 #9374DC

Accessibility & contrast

On white

9.20
#512BAB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.28
#512BAB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512BAB
9.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512BAB#FFFFFF#000000##FFFFFF
##512BAB1.009.202.289.20
#FFFFFF9.201.0021.001.00
#0000002.2821.001.0021.00
##FFFFFF9.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AAF
Deuteranopia (green-blind)
#0044A9
Tritanopia (blue-blind)
#2F4E69
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #512bab;
/* rgb */ color: rgb(81, 43, 171);
/* oklch */ color: oklch(42.2% 0.189 289.2);
Tailwind
colors: {
  custom: {
    50: '#8b68c5',
    500: '#512bab',
    950: '#000000',
  },
}
SCSS
$custom: #512bab;
$custom-light: #8b68c5;
$custom-dark: #000000;
JSON
{
  "hex": "#512bab",
  "rgb": {
    "r": 81,
    "g": 43,
    "b": 171
  },
  "hsl": {
    "h": 257.813,
    "s": 59.813,
    "l": 41.961
  },
  "oklch": {
    "l": 0.42172,
    "c": 0.18912,
    "h": 289.2
  },
  "luminance": 0.06417
}

Semantic roles & 50–950 ramp

primary
#512BAB
secondary
#AAC46E
accent
#E345B4
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0613
muted
#7E7A82

Preview Lab

Preview with #512BAB

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

Preview Lab → · Contrast checker → · Palette generator →

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