#512B97#512B97

#512B97 is a dark, vivid violet. Relative luminance 0.057; OKLCH L 40.4% C 0.166 H 293.7°. Best body text is #FFFFFF at 9.80:1 contrast (WCAG AA passes).

Color values

HEX#512B97
RGBrgb(81, 43, 151)
HSLhsl(261, 56%, 38%)
HSVhsv(261, 72%, 59%)
CMYKcmyk(46.4%, 71.5%, 0%, 40.8%)
CIE-LABlab(28.67, 42.24, -52.91)
CIE-LCHlch(28.67, 67.70, 308.60°)
OKLaboklab(40.38% 0.0667 -0.1515)
OKLCHoklch(40.38% 0.166 293.7)
XYZxyz(9.8416, 5.7112, 29.8560)
Luminance0.0571 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512B97 #71972B
analogous
#2B3B97 #512B97 #872B97
triadic
#512B97 #97512B #2B9751
tetradic
#512B97 #972B3B #71972B #2B9787
square
#512B97 #972B3B #71972B #2B9787
split-complementary
#512B97 #97872B #3B972B
monochromatic
#1E1038 #371D67 #512B97 #6B39C7 #8E68D4

Accessibility & contrast

On white

9.80
#512B97 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.14
#512B97 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512B97
9.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512B97#FFFFFF#000000##FFFFFF
##512B971.009.802.149.80
#FFFFFF9.801.0021.001.00
#0000002.1421.001.0021.00
##FFFFFF9.801.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #512b97;
/* rgb */ color: rgb(81, 43, 151);
/* oklch */ color: oklch(40.4% 0.166 293.7);
Tailwind
colors: {
  custom: {
    50: '#8868b6',
    500: '#512b97',
    950: '#000000',
  },
}
SCSS
$custom: #512b97;
$custom-light: #8868b6;
$custom-dark: #000000;
JSON
{
  "hex": "#512b97",
  "rgb": {
    "r": 81,
    "g": 43,
    "b": 151
  },
  "hsl": {
    "h": 261.111,
    "s": 55.67,
    "l": 38.039
  },
  "oklch": {
    "l": 0.40375,
    "c": 0.16554,
    "h": 293.7
  },
  "luminance": 0.05711
}

Semantic roles & 50–950 ramp

primary
#512B97
secondary
#9CBB63
accent
#DF49AA
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512B97

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

Preview Lab → · Contrast checker → · Palette generator →

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