#511D8E#511D8E

#511D8E is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.9% C 0.171 H 298.6°. Best body text is #FFFFFF at 10.96:1 contrast (WCAG AA passes).

Color values

HEX#511D8E
RGBrgb(81, 29, 142)
HSLhsl(268, 66%, 34%)
HSVhsv(268, 80%, 56%)
CMYKcmyk(43%, 79.6%, 0%, 44.3%)
CIE-LABlab(25.51, 46.55, -52.54)
CIE-LCHlch(25.51, 70.19, 311.54°)
OKLaboklab(37.9% 0.0818 -0.1503)
OKLCHoklch(37.9% 0.171 298.6)
XYZxyz(8.7139, 4.5809, 26.0110)
Luminance0.0458 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#511D8E #5A8E1D
analogous
#1D218E #511D8E #891D8E
triadic
#511D8E #8E511D #1D8E51
tetradic
#511D8E #8E1D21 #5A8E1D #1D8E89
square
#511D8E #8E1D21 #5A8E1D #1D8E89
split-complementary
#511D8E #8E891D #218E1D
monochromatic
#170828 #34135B #511D8E #6E27C1 #8D4BDA

Accessibility & contrast

On white

10.96
#511D8E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#511D8E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #511D8E
10.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##511D8E#FFFFFF#000000##FFFFFF
##511D8E1.0010.961.9210.96
#FFFFFF10.961.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C91
Deuteranopia (green-blind)
#003B8C
Tritanopia (blue-blind)
#423C55
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #511d8e;
/* rgb */ color: rgb(81, 29, 142);
/* oklch */ color: oklch(37.9% 0.171 298.6);
Tailwind
colors: {
  custom: {
    50: '#8860b0',
    500: '#511d8e',
    950: '#000000',
  },
}
SCSS
$custom: #511d8e;
$custom-light: #8860b0;
$custom-dark: #000000;
JSON
{
  "hex": "#511d8e",
  "rgb": {
    "r": 81,
    "g": 29,
    "b": 142
  },
  "hsl": {
    "h": 267.611,
    "s": 66.082,
    "l": 33.529
  },
  "oklch": {
    "l": 0.37899,
    "c": 0.17114,
    "h": 298.6
  },
  "luminance": 0.04581
}

Semantic roles & 50–950 ramp

primary
#511D8E
secondary
#88BD4A
accent
#E93F9B
background
#F8F5FA
surface
#F0EAF5
border
#CBC6CF
text
#0C0511
muted
#7D7980

Preview Lab

Preview with #511D8E

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

Preview Lab → · Contrast checker → · Palette generator →

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