#512D8E#512D8E

#512D8E is a dark, vivid violet. Relative luminance 0.056; OKLCH L 39.9% C 0.152 H 295.8°. Best body text is #FFFFFF at 9.93:1 contrast (WCAG AA passes).

Color values

HEX#512D8E
RGBrgb(81, 45, 142)
HSLhsl(262, 52%, 37%)
HSVhsv(262, 68%, 56%)
CMYKcmyk(43%, 68.3%, 0%, 44.3%)
CIE-LABlab(28.32, 38.63, -47.94)
CIE-LCHlch(28.32, 61.57, 308.86°)
OKLaboklab(39.9% 0.0661 -0.1369)
OKLCHoklch(39.9% 0.152 295.8)
XYZxyz(9.2129, 5.5789, 26.1774)
Luminance0.0558 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512D8E #6A8E2D
analogous
#2D3A8E #512D8E #822D8E
triadic
#512D8E #8E512D #2D8E51
tetradic
#512D8E #8E2D3A #6A8E2D #2D8E82
square
#512D8E #8E2D3A #6A8E2D #2D8E82
split-complementary
#512D8E #8E822D #3A8E2D
monochromatic
#1C1031 #361E60 #512D8E #6C3CBC #8D67CF

Accessibility & contrast

On white

9.93
#512D8E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512D8E
9.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512D8E#FFFFFF#000000##FFFFFF
##512D8E1.009.932.129.93
#FFFFFF9.931.0021.001.00
#0000002.1221.001.0021.00
##FFFFFF9.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004391
Deuteranopia (green-blind)
#00418C
Tritanopia (blue-blind)
#414459
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #512d8e;
/* rgb */ color: rgb(81, 45, 142);
/* oklch */ color: oklch(39.9% 0.152 295.8);
Tailwind
colors: {
  custom: {
    50: '#8768b0',
    500: '#512d8e',
    950: '#000000',
  },
}
SCSS
$custom: #512d8e;
$custom-light: #8768b0;
$custom-dark: #000000;
JSON
{
  "hex": "#512d8e",
  "rgb": {
    "r": 81,
    "g": 45,
    "b": 142
  },
  "hsl": {
    "h": 262.268,
    "s": 51.872,
    "l": 36.667
  },
  "oklch": {
    "l": 0.39896,
    "c": 0.15203,
    "h": 295.8
  },
  "luminance": 0.05579
}

Semantic roles & 50–950 ramp

primary
#512D8E
secondary
#96B561
accent
#DB4CA6
background
#F8F6FA
surface
#F0EBF5
border
#CBC6CF
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512D8E

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

Preview Lab → · Contrast checker → · Palette generator →

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