#511F8A#511F8A

#511F8A is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.8% C 0.165 H 299.5°. Best body text is #FFFFFF at 10.98:1 contrast (WCAG AA passes).

Color values

HEX#511F8A
RGBrgb(81, 31, 138)
HSLhsl(268, 63%, 33%)
HSVhsv(268, 78%, 54%)
CMYKcmyk(41.3%, 77.5%, 0%, 45.9%)
CIE-LABlab(25.46, 44.64, -50.13)
CIE-LCHlch(25.46, 67.13, 311.69°)
OKLaboklab(37.75% 0.0812 -0.1433)
OKLCHoklch(37.75% 0.165 299.5)
XYZxyz(8.4696, 4.5642, 24.4746)
Luminance0.0456 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#511F8A #588A1F
analogous
#1F238A #511F8A #861F8A
triadic
#511F8A #8A511F #1F8A51
tetradic
#511F8A #8A1F23 #588A1F #1F8A86
square
#511F8A #8A1F23 #588A1F #1F8A86
split-complementary
#511F8A #8A861F #238A1F
monochromatic
#160926 #341458 #511F8A #6E2ABC #8D4CD7

Accessibility & contrast

On white

10.98
#511F8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.91
#511F8A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #511F8A
10.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##511F8A#FFFFFF#000000##FFFFFF
##511F8A1.0010.981.9110.98
#FFFFFF10.981.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF10.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8D
Deuteranopia (green-blind)
#003B88
Tritanopia (blue-blind)
#433B53
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #511f8a;
/* rgb */ color: rgb(81, 31, 138);
/* oklch */ color: oklch(37.8% 0.165 299.5);
Tailwind
colors: {
  custom: {
    50: '#8860ad',
    500: '#511f8a',
    950: '#000000',
  },
}
SCSS
$custom: #511f8a;
$custom-light: #8860ad;
$custom-dark: #000000;
JSON
{
  "hex": "#511f8a",
  "rgb": {
    "r": 81,
    "g": 31,
    "b": 138
  },
  "hsl": {
    "h": 268.037,
    "s": 63.314,
    "l": 33.137
  },
  "oklch": {
    "l": 0.37753,
    "c": 0.16466,
    "h": 299.5
  },
  "luminance": 0.04564
}

Semantic roles & 50–950 ramp

primary
#511F8A
secondary
#86BA4B
accent
#E64199
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C0510
muted
#7D797F

Preview Lab

Preview with #511F8A

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

Preview Lab → · Contrast checker → · Palette generator →

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