#512D8F#512D8F

#512D8F is a dark, vivid violet. Relative luminance 0.056; OKLCH L 40.0% C 0.153 H 295.5°. Best body text is #FFFFFF at 9.90:1 contrast (WCAG AA passes).

Color values

HEX#512D8F
RGBrgb(81, 45, 143)
HSLhsl(262, 52%, 37%)
HSVhsv(262, 69%, 56%)
CMYKcmyk(43.4%, 68.5%, 0%, 43.9%)
CIE-LABlab(28.40, 38.91, -48.43)
CIE-LCHlch(28.40, 62.12, 308.78°)
OKLaboklab(39.98% 0.0659 -0.1383)
OKLCHoklch(39.98% 0.153 295.5)
XYZxyz(9.2883, 5.6091, 26.5746)
Luminance0.0561 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512D8F #6B8F2D
analogous
#2D3A8F #512D8F #822D8F
triadic
#512D8F #8F512D #2D8F51
tetradic
#512D8F #8F2D3A #6B8F2D #2D8F82
square
#512D8F #8F2D3A #6B8F2D #2D8F82
split-complementary
#512D8F #8F822D #3A8F2D
monochromatic
#1C1032 #371E60 #512D8F #6B3CBE #8D67CF

Accessibility & contrast

On white

9.90
#512D8F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.12
#512D8F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512D8F
9.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512D8F#FFFFFF#000000##FFFFFF
##512D8F1.009.902.129.90
#FFFFFF9.901.0021.001.00
#0000002.1221.001.0021.00
##FFFFFF9.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004492
Deuteranopia (green-blind)
#00428D
Tritanopia (blue-blind)
#41445A
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #512d8f;
/* rgb */ color: rgb(81, 45, 143);
/* oklch */ color: oklch(40.0% 0.153 295.5);
Tailwind
colors: {
  custom: {
    50: '#8768b1',
    500: '#512d8f',
    950: '#000000',
  },
}
SCSS
$custom: #512d8f;
$custom-light: #8768b1;
$custom-dark: #000000;
JSON
{
  "hex": "#512d8f",
  "rgb": {
    "r": 81,
    "g": 45,
    "b": 143
  },
  "hsl": {
    "h": 262.041,
    "s": 52.128,
    "l": 36.863
  },
  "oklch": {
    "l": 0.39978,
    "c": 0.15326,
    "h": 295.5
  },
  "luminance": 0.05609
}

Semantic roles & 50–950 ramp

primary
#512D8F
secondary
#97B662
accent
#DC4CA7
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512D8F

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

Preview Lab → · Contrast checker → · Palette generator →

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