#511A7E#511A7E

#511A7E is a dark, vivid violet. Relative luminance 0.040; OKLCH L 36.2% C 0.157 H 304.4°. Best body text is #FFFFFF at 11.67:1 contrast (WCAG AA passes).

Color values

HEX#511A7E
RGBrgb(81, 26, 126)
HSLhsl(273, 66%, 30%)
HSVhsv(273, 79%, 49%)
CMYKcmyk(35.7%, 79.4%, 0%, 50.6%)
CIE-LABlab(23.65, 43.80, -45.53)
CIE-LCHlch(23.65, 63.18, 313.89°)
OKLaboklab(36.17% 0.0888 -0.1297)
OKLCHoklch(36.17% 0.157 304.4)
XYZxyz(7.5278, 3.9945, 20.1091)
Luminance0.0399 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#511A7E #477E1A
analogous
#1F1A7E #511A7E #7E1A79
triadic
#511A7E #7E511A #1A7E51
tetradic
#511A7E #7E1F1A #477E1A #1A797E
square
#511A7E #7E1F1A #477E1A #1A797E
split-complementary
#511A7E #797E1A #1A7E1F
monochromatic
#100519 #30104B #511A7E #7224B1 #913CD7

Accessibility & contrast

On white

11.67
#511A7E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#511A7E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #511A7E
11.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##511A7E#FFFFFF#000000##FFFFFF
##511A7E1.0011.671.8011.67
#FFFFFF11.671.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003781
Deuteranopia (green-blind)
#00387C
Tritanopia (blue-blind)
#48344B
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #511a7e;
/* rgb */ color: rgb(81, 26, 126);
/* oklch */ color: oklch(36.2% 0.157 304.4);
Tailwind
colors: {
  custom: {
    50: '#875da4',
    500: '#511a7e',
    950: '#000000',
  },
}
SCSS
$custom: #511a7e;
$custom-light: #875da4;
$custom-dark: #000000;
JSON
{
  "hex": "#511a7e",
  "rgb": {
    "r": 81,
    "g": 26,
    "b": 126
  },
  "hsl": {
    "h": 273,
    "s": 65.789,
    "l": 29.804
  },
  "oklch": {
    "l": 0.36166,
    "c": 0.15723,
    "h": 304.4
  },
  "luminance": 0.03994
}

Semantic roles & 50–950 ramp

primary
#511A7E
secondary
#74B242
accent
#E93F8B
background
#F8F5FA
surface
#F0E9F4
border
#CBC5CE
text
#0C050F
muted
#7D797F

Preview Lab

Preview with #511A7E

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

Preview Lab → · Contrast checker → · Palette generator →

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