#512D8A#512D8A

#512D8A is a dark, vivid violet. Relative luminance 0.055; OKLCH L 39.6% C 0.147 H 296.9°. Best body text is #FFFFFF at 10.04:1 contrast (WCAG AA passes).

Color values

HEX#512D8A
RGBrgb(81, 45, 138)
HSLhsl(263, 51%, 36%)
HSVhsv(263, 67%, 54%)
CMYKcmyk(41.3%, 67.4%, 0%, 45.9%)
CIE-LABlab(28.01, 37.51, -45.97)
CIE-LCHlch(28.01, 59.33, 309.21°)
OKLaboklab(39.57% 0.0666 -0.1311)
OKLCHoklch(39.57% 0.147 296.9)
XYZxyz(8.9180, 5.4609, 24.6240)
Luminance0.0546 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512D8A #668A2D
analogous
#2D378A #512D8A #7F2D8A
triadic
#512D8A #8A512D #2D8A51
tetradic
#512D8A #8A2D37 #668A2D #2D8A7F
square
#512D8A #8A2D37 #668A2D #2D8A7F
split-complementary
#512D8A #8A7F2D #378A2D
monochromatic
#1B0F2E #361E5C #512D8A #6C3CB8 #8D65CD

Accessibility & contrast

On white

10.04
#512D8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#512D8A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512D8A
10.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512D8A#FFFFFF#000000##FFFFFF
##512D8A1.0010.042.0910.04
#FFFFFF10.041.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00428D
Deuteranopia (green-blind)
#004188
Tritanopia (blue-blind)
#434357
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #512d8a;
/* rgb */ color: rgb(81, 45, 138);
/* oklch */ color: oklch(39.6% 0.147 296.9);
Tailwind
colors: {
  custom: {
    50: '#8768ad',
    500: '#512d8a',
    950: '#000000',
  },
}
SCSS
$custom: #512d8a;
$custom-light: #8768ad;
$custom-dark: #000000;
JSON
{
  "hex": "#512d8a",
  "rgb": {
    "r": 81,
    "g": 45,
    "b": 138
  },
  "hsl": {
    "h": 263.226,
    "s": 50.82,
    "l": 35.882
  },
  "oklch": {
    "l": 0.3957,
    "c": 0.14707,
    "h": 296.9
  },
  "luminance": 0.05461
}

Semantic roles & 50–950 ramp

primary
#512D8A
secondary
#93B360
accent
#DA4DA4
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512D8A

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

Preview Lab → · Contrast checker → · Palette generator →

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