#511D8B#511D8B

#511D8B is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.6% C 0.168 H 299.5°. Best body text is #FFFFFF at 11.06:1 contrast (WCAG AA passes).

Color values

HEX#511D8B
RGBrgb(81, 29, 139)
HSLhsl(268, 65%, 33%)
HSVhsv(268, 79%, 55%)
CMYKcmyk(41.7%, 79.1%, 0%, 45.5%)
CIE-LABlab(25.24, 45.78, -51.11)
CIE-LCHlch(25.24, 68.62, 311.85°)
OKLaboklab(37.63% 0.0827 -0.1461)
OKLCHoklch(37.63% 0.168 299.5)
XYZxyz(8.4917, 4.4920, 24.8408)
Luminance0.0449 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#511D8B #578B1D
analogous
#1D208B #511D8B #881D8B
triadic
#511D8B #8B511D #1D8B51
tetradic
#511D8B #8B1D20 #578B1D #1D8B88
square
#511D8B #8B1D20 #578B1D #1D8B88
split-complementary
#511D8B #8B881D #208B1D
monochromatic
#160826 #331258 #511D8B #6F28BE #8D49D9

Accessibility & contrast

On white

11.06
#511D8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.90
#511D8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #511D8B
11.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##511D8B#FFFFFF#000000##FFFFFF
##511D8B1.0011.061.9011.06
#FFFFFF11.061.0021.001.00
#0000001.9021.001.0021.00
##FFFFFF11.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8E
Deuteranopia (green-blind)
#003B89
Tritanopia (blue-blind)
#433B53
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #511d8b;
/* rgb */ color: rgb(81, 29, 139);
/* oklch */ color: oklch(37.6% 0.168 299.5);
Tailwind
colors: {
  custom: {
    50: '#885fae',
    500: '#511d8b',
    950: '#000000',
  },
}
SCSS
$custom: #511d8b;
$custom-light: #885fae;
$custom-dark: #000000;
JSON
{
  "hex": "#511d8b",
  "rgb": {
    "r": 81,
    "g": 29,
    "b": 139
  },
  "hsl": {
    "h": 268.364,
    "s": 65.476,
    "l": 32.941
  },
  "oklch": {
    "l": 0.37626,
    "c": 0.1679,
    "h": 299.5
  },
  "luminance": 0.04492
}

Semantic roles & 50–950 ramp

primary
#511D8B
secondary
#85BB49
accent
#E83F99
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C0510
muted
#7D797F

Preview Lab

Preview with #511D8B

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

Preview Lab → · Contrast checker → · Palette generator →

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