#512A97#512A97

#512A97 is a dark, vivid violet. Relative luminance 0.056; OKLCH L 40.2% C 0.167 H 293.9°. Best body text is #FFFFFF at 9.87:1 contrast (WCAG AA passes).

Color values

HEX#512A97
RGBrgb(81, 42, 151)
HSLhsl(261, 56%, 38%)
HSVhsv(261, 72%, 59%)
CMYKcmyk(46.4%, 72.2%, 0%, 40.8%)
CIE-LABlab(28.48, 42.76, -53.22)
CIE-LCHlch(28.48, 68.27, 308.78°)
OKLaboklab(40.24% 0.0677 -0.1524)
OKLCHoklch(40.24% 0.167 293.9)
XYZxyz(9.8057, 5.6393, 29.8440)
Luminance0.0564 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512A97 #70972A
analogous
#2A3997 #512A97 #872A97
triadic
#512A97 #97512A #2A9751
tetradic
#512A97 #972A39 #70972A #2A9787
square
#512A97 #972A39 #70972A #2A9787
split-complementary
#512A97 #97872A #39972A
monochromatic
#1E0F37 #371D67 #512A97 #6B37C7 #8E67D5

Accessibility & contrast

On white

9.87
#512A97 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.13
#512A97 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512A97
9.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512A97#FFFFFF#000000##FFFFFF
##512A971.009.872.139.87
#FFFFFF9.871.0021.001.00
#0000002.1321.001.0021.00
##FFFFFF9.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00449A
Deuteranopia (green-blind)
#004195
Tritanopia (blue-blind)
#3D465D
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #512a97;
/* rgb */ color: rgb(81, 42, 151);
/* oklch */ color: oklch(40.2% 0.167 293.9);
Tailwind
colors: {
  custom: {
    50: '#8967b6',
    500: '#512a97',
    950: '#000000',
  },
}
SCSS
$custom: #512a97;
$custom-light: #8967b6;
$custom-dark: #000000;
JSON
{
  "hex": "#512a97",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 151
  },
  "hsl": {
    "h": 261.468,
    "s": 56.477,
    "l": 37.843
  },
  "oklch": {
    "l": 0.40241,
    "c": 0.16676,
    "h": 293.9
  },
  "luminance": 0.0564
}

Semantic roles & 50–950 ramp

primary
#512A97
secondary
#9BBB62
accent
#E048A9
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512A97

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

Preview Lab → · Contrast checker → · Palette generator →

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