#511D8D#511D8D

#511D8D is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.8% C 0.170 H 298.9°. Best body text is #FFFFFF at 10.99:1 contrast (WCAG AA passes).

Color values

HEX#511D8D
RGBrgb(81, 29, 141)
HSLhsl(268, 66%, 33%)
HSVhsv(268, 79%, 55%)
CMYKcmyk(42.6%, 79.4%, 0%, 44.7%)
CIE-LABlab(25.42, 46.30, -52.06)
CIE-LCHlch(25.42, 69.67, 311.64°)
OKLaboklab(37.81% 0.0821 -0.1489)
OKLCHoklch(37.81% 0.17 298.9)
XYZxyz(8.6392, 4.5510, 25.6174)
Luminance0.0455 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#511D8D #598D1D
analogous
#1D218D #511D8D #891D8D
triadic
#511D8D #8D511D #1D8D51
tetradic
#511D8D #8D1D21 #598D1D #1D8D89
square
#511D8D #8D1D21 #598D1D #1D8D89
split-complementary
#511D8D #8D891D #218D1D
monochromatic
#170827 #34135A #511D8D #6E27C0 #8D4BDA

Accessibility & contrast

On white

10.99
#511D8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.91
#511D8D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #511D8D
10.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##511D8D#FFFFFF#000000##FFFFFF
##511D8D1.0010.991.9110.99
#FFFFFF10.991.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF10.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C90
Deuteranopia (green-blind)
#003B8B
Tritanopia (blue-blind)
#423B55
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #511d8d;
/* rgb */ color: rgb(81, 29, 141);
/* oklch */ color: oklch(37.8% 0.170 298.9);
Tailwind
colors: {
  custom: {
    50: '#8860af',
    500: '#511d8d',
    950: '#000000',
  },
}
SCSS
$custom: #511d8d;
$custom-light: #8860af;
$custom-dark: #000000;
JSON
{
  "hex": "#511d8d",
  "rgb": {
    "r": 81,
    "g": 29,
    "b": 141
  },
  "hsl": {
    "h": 267.857,
    "s": 65.882,
    "l": 33.333
  },
  "oklch": {
    "l": 0.37807,
    "c": 0.17006,
    "h": 298.9
  },
  "luminance": 0.04551
}

Semantic roles & 50–950 ramp

primary
#511D8D
secondary
#87BC4A
accent
#E93F9A
background
#F8F5FA
surface
#F0EAF5
border
#CBC6CF
text
#0C0510
muted
#7D797F

Preview Lab

Preview with #511D8D

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

Preview Lab → · Contrast checker → · Palette generator →

#511D8D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva