#511F7F#511F7F

#511F7F is a dark, vivid violet. Relative luminance 0.043; OKLCH L 36.8% C 0.153 H 303.3°. Best body text is #FFFFFF at 11.34:1 contrast (WCAG AA passes).

Color values

HEX#511F7F
RGBrgb(81, 31, 127)
HSLhsl(271, 61%, 31%)
HSVhsv(271, 76%, 50%)
CMYKcmyk(36.2%, 75.6%, 0%, 50.2%)
CIE-LABlab(24.52, 41.83, -44.75)
CIE-LCHlch(24.52, 61.26, 313.06°)
OKLaboklab(36.8% 0.0838 -0.1275)
OKLCHoklch(36.8% 0.153 303.3)
XYZxyz(7.7132, 4.2616, 20.4908)
Luminance0.0426 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#511F7F #4D7F1F
analogous
#211F7F #511F7F #7F1F7D
triadic
#511F7F #7F511F #1F7F51
tetradic
#511F7F #7F211F #4D7F1F #1F7D7F
square
#511F7F #7F211F #4D7F1F #1F7D7F
split-complementary
#511F7F #7D7F1F #1F7F21
monochromatic
#12071D #32134E #511F7F #702BB0 #8F46D2

Accessibility & contrast

On white

11.34
#511F7F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.85
#511F7F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #511F7F
11.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##511F7F#FFFFFF#000000##FFFFFF
##511F7F1.0011.341.8511.34
#FFFFFF11.341.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003982
Deuteranopia (green-blind)
#003A7D
Tritanopia (blue-blind)
#48374D
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #511f7f;
/* rgb */ color: rgb(81, 31, 127);
/* oklch */ color: oklch(36.8% 0.153 303.3);
Tailwind
colors: {
  custom: {
    50: '#8660a5',
    500: '#511f7f',
    950: '#000000',
  },
}
SCSS
$custom: #511f7f;
$custom-light: #8660a5;
$custom-dark: #000000;
JSON
{
  "hex": "#511f7f",
  "rgb": {
    "r": 81,
    "g": 31,
    "b": 127
  },
  "hsl": {
    "h": 271.25,
    "s": 60.759,
    "l": 30.98
  },
  "oklch": {
    "l": 0.36801,
    "c": 0.15253,
    "h": 303.3
  },
  "luminance": 0.04262
}

Semantic roles & 50–950 ramp

primary
#511F7F
secondary
#7BB248
accent
#E44491
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C050F
muted
#7D797F

Preview Lab

Preview with #511F7F

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

Preview Lab → · Contrast checker → · Palette generator →

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