#511788#511788

#511788 is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.8% C 0.171 H 301.2°. Best body text is #FFFFFF at 11.49:1 contrast (WCAG AA passes).

Color values

HEX#511788
RGBrgb(81, 23, 136)
HSLhsl(271, 71%, 31%)
HSVhsv(271, 83%, 53%)
CMYKcmyk(40.4%, 83.1%, 0%, 46.7%)
CIE-LABlab(24.13, 47.45, -51.05)
CIE-LCHlch(24.13, 69.70, 312.91°)
OKLaboklab(36.77% 0.0885 -0.1459)
OKLCHoklch(36.77% 0.171 301.2)
XYZxyz(8.1426, 4.1396, 23.6578)
Luminance0.0414 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#511788 #4E8817
analogous
#181788 #511788 #881786
triadic
#511788 #885117 #178851
tetradic
#511788 #881817 #4E8817 #178688
square
#511788 #881817 #4E8817 #178688
split-complementary
#511788 #868817 #178818
monochromatic
#13051F #320E54 #511788 #7020BC #8F3BDE

Accessibility & contrast

On white

11.49
#511788 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.83
#511788 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #511788
11.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##511788#FFFFFF#000000##FFFFFF
##5117881.0011.491.8311.49
#FFFFFF11.491.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00398B
Deuteranopia (green-blind)
#003986
Tritanopia (blue-blind)
#443750
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #511788;
/* rgb */ color: rgb(81, 23, 136);
/* oklch */ color: oklch(36.8% 0.171 301.2);
Tailwind
colors: {
  custom: {
    50: '#885cac',
    500: '#511788',
    950: '#000000',
  },
}
SCSS
$custom: #511788;
$custom-light: #885cac;
$custom-dark: #000000;
JSON
{
  "hex": "#511788",
  "rgb": {
    "r": 81,
    "g": 23,
    "b": 136
  },
  "hsl": {
    "h": 270.796,
    "s": 71.069,
    "l": 31.176
  },
  "oklch": {
    "l": 0.36771,
    "c": 0.17063,
    "h": 301.2
  },
  "luminance": 0.0414
}

Semantic roles & 50–950 ramp

primary
#511788
secondary
#7CBC3F
accent
#EE3A92
background
#F8F5FA
surface
#F0E9F4
border
#CBC5CE
text
#0C0410
muted
#7D797F

Preview Lab

Preview with #511788

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

Preview Lab → · Contrast checker → · Palette generator →

#511788 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva