#512D96#512D96

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

Color values

HEX#512D96
RGBrgb(81, 45, 150)
HSLhsl(261, 54%, 38%)
HSVhsv(261, 70%, 59%)
CMYKcmyk(46%, 70%, 0%, 41.2%)
CIE-LABlab(28.97, 40.89, -51.81)
CIE-LCHlch(28.97, 66.00, 308.28°)
OKLaboklab(40.57% 0.0648 -0.1483)
OKLCHoklch(40.57% 0.162 293.6)
XYZxyz(9.8352, 5.8278, 29.4549)
Luminance0.0583 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512D96 #72962D
analogous
#2D3E96 #512D96 #852D96
triadic
#512D96 #96512D #2D9651
tetradic
#512D96 #962D3E #72962D #2D9685
square
#512D96 #962D3E #72962D #2D9685
split-complementary
#512D96 #96852D #3E962D
monochromatic
#1E1138 #381F67 #512D96 #6B3CC4 #8E6BD3

Accessibility & contrast

On white

9.70
#512D96 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.17
#512D96 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512D96
9.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512D96#FFFFFF#000000##FFFFFF
##512D961.009.702.179.70
#FFFFFF9.701.0021.001.00
#0000002.1721.001.0021.00
##FFFFFF9.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004599
Deuteranopia (green-blind)
#004294
Tritanopia (blue-blind)
#3D475E
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #512d96;
/* rgb */ color: rgb(81, 45, 150);
/* oklch */ color: oklch(40.6% 0.162 293.6);
Tailwind
colors: {
  custom: {
    50: '#8869b6',
    500: '#512d96',
    950: '#000000',
  },
}
SCSS
$custom: #512d96;
$custom-light: #8869b6;
$custom-dark: #000000;
JSON
{
  "hex": "#512d96",
  "rgb": {
    "r": 81,
    "g": 45,
    "b": 150
  },
  "hsl": {
    "h": 260.571,
    "s": 53.846,
    "l": 38.235
  },
  "oklch": {
    "l": 0.40565,
    "c": 0.16183,
    "h": 293.6
  },
  "luminance": 0.05828
}

Semantic roles & 50–950 ramp

primary
#512D96
secondary
#9DB965
accent
#DD4BAB
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512D96

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

Preview Lab → · Contrast checker → · Palette generator →

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