#511D7B#511D7B

#511D7B is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.2% C 0.151 H 305.1°. Best body text is #FFFFFF at 11.59:1 contrast (WCAG AA passes).

Color values

HEX#511D7B
RGBrgb(81, 29, 123)
HSLhsl(273, 62%, 30%)
HSVhsv(273, 76%, 48%)
CMYKcmyk(34.1%, 76.4%, 0%, 51.8%)
CIE-LABlab(23.86, 41.75, -43.28)
CIE-LCHlch(23.86, 60.14, 313.96°)
OKLaboklab(36.24% 0.0866 -0.1231)
OKLCHoklch(36.24% 0.151 305.1)
XYZxyz(7.4071, 4.0582, 19.1281)
Luminance0.0406 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#511D7B #477B1D
analogous
#221D7B #511D7B #7B1D76
triadic
#511D7B #7B511D #1D7B51
tetradic
#511D7B #7B221D #477B1D #1D767B
square
#511D7B #7B221D #477B1D #1D767B
split-complementary
#511D7B #767B1D #1D7B22
monochromatic
#100619 #301149 #511D7B #7229AD #9140D2

Accessibility & contrast

On white

11.59
#511D7B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#511D7B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #511D7B
11.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##511D7B#FFFFFF#000000##FFFFFF
##511D7B1.0011.591.8111.59
#FFFFFF11.591.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00377E
Deuteranopia (green-blind)
#003979
Tritanopia (blue-blind)
#49344A
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #511d7b;
/* rgb */ color: rgb(81, 29, 123);
/* oklch */ color: oklch(36.2% 0.151 305.1);
Tailwind
colors: {
  custom: {
    50: '#865fa2',
    500: '#511d7b',
    950: '#000000',
  },
}
SCSS
$custom: #511d7b;
$custom-light: #865fa2;
$custom-dark: #000000;
JSON
{
  "hex": "#511d7b",
  "rgb": {
    "r": 81,
    "g": 29,
    "b": 123
  },
  "hsl": {
    "h": 273.191,
    "s": 61.842,
    "l": 29.804
  },
  "oklch": {
    "l": 0.36235,
    "c": 0.15057,
    "h": 305.1
  },
  "luminance": 0.04058
}

Semantic roles & 50–950 ramp

primary
#511D7B
secondary
#74AF45
accent
#E5438B
background
#F8F5FA
surface
#F0E9F3
border
#CBC5CD
text
#0C050F
muted
#7D797F

Preview Lab

Preview with #511D7B

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

Preview Lab → · Contrast checker → · Palette generator →

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