#511D8C#511D8C

#511D8C is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.7% C 0.169 H 299.2°. Best body text is #FFFFFF at 11.03:1 contrast (WCAG AA passes).

Color values

HEX#511D8C
RGBrgb(81, 29, 140)
HSLhsl(268, 66%, 33%)
HSVhsv(268, 79%, 55%)
CMYKcmyk(42.1%, 79.3%, 0%, 45.1%)
CIE-LABlab(25.33, 46.04, -51.59)
CIE-LCHlch(25.33, 69.14, 311.75°)
OKLaboklab(37.72% 0.0824 -0.1475)
OKLCHoklch(37.72% 0.169 299.2)
XYZxyz(8.5651, 4.5214, 25.2273)
Luminance0.0452 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#511D8C #588C1D
analogous
#1D218C #511D8C #881D8C
triadic
#511D8C #8C511D #1D8C51
tetradic
#511D8C #8C1D21 #588C1D #1D8C88
square
#511D8C #8C1D21 #588C1D #1D8C88
split-complementary
#511D8C #8C881D #218C1D
monochromatic
#160827 #341259 #511D8C #6E28BF #8D4AD9

Accessibility & contrast

On white

11.03
#511D8C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #511D8C
11.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##511D8C#FFFFFF#000000##FFFFFF
##511D8C1.0011.031.9011.03
#FFFFFF11.031.0021.001.00
#0000001.9021.001.0021.00
##FFFFFF11.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8F
Deuteranopia (green-blind)
#003B8A
Tritanopia (blue-blind)
#433B54
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #511d8c;
/* rgb */ color: rgb(81, 29, 140);
/* oklch */ color: oklch(37.7% 0.169 299.2);
Tailwind
colors: {
  custom: {
    50: '#885faf',
    500: '#511d8c',
    950: '#000000',
  },
}
SCSS
$custom: #511d8c;
$custom-light: #885faf;
$custom-dark: #000000;
JSON
{
  "hex": "#511d8c",
  "rgb": {
    "r": 81,
    "g": 29,
    "b": 140
  },
  "hsl": {
    "h": 268.108,
    "s": 65.68,
    "l": 33.137
  },
  "oklch": {
    "l": 0.37717,
    "c": 0.16898,
    "h": 299.2
  },
  "luminance": 0.04522
}

Semantic roles & 50–950 ramp

primary
#511D8C
secondary
#86BC49
accent
#E93F99
background
#F8F5FA
surface
#F0EAF5
border
#CBC6CF
text
#0C0510
muted
#7D797F

Preview Lab

Preview with #511D8C

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

Preview Lab → · Contrast checker → · Palette generator →

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