#512C97#512C97

#512C97 is a dark, vivid violet. Relative luminance 0.058; OKLCH L 40.5% C 0.164 H 293.6°. Best body text is #FFFFFF at 9.74:1 contrast (WCAG AA passes).

Color values

HEX#512C97
RGBrgb(81, 44, 151)
HSLhsl(261, 55%, 38%)
HSVhsv(261, 71%, 59%)
CMYKcmyk(46.4%, 70.9%, 0%, 40.8%)
CIE-LABlab(28.86, 41.71, -52.60)
CIE-LCHlch(28.86, 67.13, 308.41°)
OKLaboklab(40.51% 0.0657 -0.1506)
OKLCHoklch(40.51% 0.164 293.6)
XYZxyz(9.8784, 5.7848, 29.8683)
Luminance0.0578 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512C97 #72972C
analogous
#2C3C97 #512C97 #862C97
triadic
#512C97 #97512C #2C9751
tetradic
#512C97 #972C3C #72972C #2C9786
square
#512C97 #972C3C #72972C #2C9786
split-complementary
#512C97 #97862C #3C972C
monochromatic
#1E1038 #381E68 #512C97 #6B3AC6 #8E6AD4

Accessibility & contrast

On white

9.74
#512C97 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.16
#512C97 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512C97
9.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512C97#FFFFFF#000000##FFFFFF
##512C971.009.742.169.74
#FFFFFF9.741.0021.001.00
#0000002.1621.001.0021.00
##FFFFFF9.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00459A
Deuteranopia (green-blind)
#004295
Tritanopia (blue-blind)
#3D475E
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #512c97;
/* rgb */ color: rgb(81, 44, 151);
/* oklch */ color: oklch(40.5% 0.164 293.6);
Tailwind
colors: {
  custom: {
    50: '#8868b6',
    500: '#512c97',
    950: '#000000',
  },
}
SCSS
$custom: #512c97;
$custom-light: #8868b6;
$custom-dark: #000000;
JSON
{
  "hex": "#512c97",
  "rgb": {
    "r": 81,
    "g": 44,
    "b": 151
  },
  "hsl": {
    "h": 260.748,
    "s": 54.872,
    "l": 38.235
  },
  "oklch": {
    "l": 0.40511,
    "c": 0.1643,
    "h": 293.6
  },
  "luminance": 0.05785
}

Semantic roles & 50–950 ramp

primary
#512C97
secondary
#9DBA65
accent
#DE4AAB
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512C97

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

Preview Lab → · Contrast checker → · Palette generator →

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