#511F7E#511F7E

#511F7E is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.7% C 0.151 H 303.7°. Best body text is #FFFFFF at 11.37:1 contrast (WCAG AA passes).

Color values

HEX#511F7E
RGBrgb(81, 31, 126)
HSLhsl(272, 61%, 31%)
HSVhsv(272, 75%, 49%)
CMYKcmyk(35.7%, 75.4%, 0%, 50.6%)
CIE-LABlab(24.44, 41.57, -44.25)
CIE-LCHlch(24.44, 60.72, 313.21°)
OKLaboklab(36.72% 0.084 -0.126)
OKLCHoklch(36.72% 0.151 303.7)
XYZxyz(7.6483, 4.2357, 20.1492)
Luminance0.0424 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#511F7E #4C7E1F
analogous
#211F7E #511F7E #7E1F7B
triadic
#511F7E #7E511F #1F7E51
tetradic
#511F7E #7E211F #4C7E1F #1F7B7E
square
#511F7E #7E211F #4C7E1F #1F7B7E
split-complementary
#511F7E #7B7E1F #1F7E21
monochromatic
#12071C #31134D #511F7E #712BAF #8F46D1

Accessibility & contrast

On white

11.37
#511F7E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #511F7E
11.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##511F7E#FFFFFF#000000##FFFFFF
##511F7E1.0011.371.8511.37
#FFFFFF11.371.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003981
Deuteranopia (green-blind)
#003A7C
Tritanopia (blue-blind)
#48364D
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #511f7e;
/* rgb */ color: rgb(81, 31, 126);
/* oklch */ color: oklch(36.7% 0.151 303.7);
Tailwind
colors: {
  custom: {
    50: '#8660a4',
    500: '#511f7e',
    950: '#000000',
  },
}
SCSS
$custom: #511f7e;
$custom-light: #8660a4;
$custom-dark: #000000;
JSON
{
  "hex": "#511f7e",
  "rgb": {
    "r": 81,
    "g": 31,
    "b": 126
  },
  "hsl": {
    "h": 271.579,
    "s": 60.51,
    "l": 30.784
  },
  "oklch": {
    "l": 0.36717,
    "c": 0.15142,
    "h": 303.7
  },
  "luminance": 0.04236
}

Semantic roles & 50–950 ramp

primary
#511F7E
secondary
#7AB148
accent
#E44490
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C050F
muted
#7D797F

Preview Lab

Preview with #511F7E

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

Preview Lab → · Contrast checker → · Palette generator →

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