#511781#511781

#511781 is a dark, vivid violet. Relative luminance 0.039; OKLCH L 36.1% C 0.163 H 303.7°. Best body text is #FFFFFF at 11.74:1 contrast (WCAG AA passes).

Color values

HEX#511781
RGBrgb(81, 23, 129)
HSLhsl(273, 70%, 30%)
HSVhsv(273, 82%, 51%)
CMYKcmyk(37.2%, 82.2%, 0%, 49.4%)
CIE-LABlab(23.50, 45.75, -47.68)
CIE-LCHlch(23.50, 66.08, 313.81°)
OKLaboklab(36.14% 0.0906 -0.136)
OKLCHoklch(36.14% 0.163 303.7)
XYZxyz(7.6613, 3.9471, 21.1229)
Luminance0.0395 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#511781 #478117
analogous
#1C1781 #511781 #81177C
triadic
#511781 #815117 #178151
tetradic
#511781 #811C17 #478117 #177C81
square
#511781 #811C17 #478117 #177C81
split-complementary
#511781 #7C8117 #17811C
monochromatic
#10051A #300E4D #511781 #7220B5 #9137DB

Accessibility & contrast

On white

11.74
#511781 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.79
#511781 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #511781
11.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##511781#FFFFFF#000000##FFFFFF
##5117811.0011.741.7911.74
#FFFFFF11.741.0021.001.00
#0000001.7921.001.0021.00
##FFFFFF11.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003784
Deuteranopia (green-blind)
#00387F
Tritanopia (blue-blind)
#47344C
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #511781;
/* rgb */ color: rgb(81, 23, 129);
/* oklch */ color: oklch(36.1% 0.163 303.7);
Tailwind
colors: {
  custom: {
    50: '#875ca6',
    500: '#511781',
    950: '#000000',
  },
}
SCSS
$custom: #511781;
$custom-light: #875ca6;
$custom-dark: #000000;
JSON
{
  "hex": "#511781",
  "rgb": {
    "r": 81,
    "g": 23,
    "b": 129
  },
  "hsl": {
    "h": 272.83,
    "s": 69.737,
    "l": 29.804
  },
  "oklch": {
    "l": 0.36137,
    "c": 0.16345,
    "h": 303.7
  },
  "luminance": 0.03947
}

Semantic roles & 50–950 ramp

primary
#511781
secondary
#74B53E
accent
#ED3B8C
background
#F8F5FA
surface
#F0E9F4
border
#CBC5CE
text
#0C040F
muted
#7D797F

Preview Lab

Preview with #511781

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

Preview Lab → · Contrast checker → · Palette generator →

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