#511F7D#511F7D

#511F7D is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.6% C 0.150 H 304.1°. Best body text is #FFFFFF at 11.40:1 contrast (WCAG AA passes).

Color values

HEX#511F7D
RGBrgb(81, 31, 125)
HSLhsl(272, 60%, 31%)
HSVhsv(272, 75%, 49%)
CMYKcmyk(35.2%, 75.2%, 0%, 51%)
CIE-LABlab(24.35, 41.32, -43.75)
CIE-LCHlch(24.35, 60.18, 313.36°)
OKLaboklab(36.63% 0.0842 -0.1245)
OKLCHoklch(36.63% 0.15 304.1)
XYZxyz(7.5841, 4.2100, 19.8111)
Luminance0.0421 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#511F7D #4B7D1F
analogous
#221F7D #511F7D #7D1F7A
triadic
#511F7D #7D511F #1F7D51
tetradic
#511F7D #7D221F #4B7D1F #1F7A7D
square
#511F7D #7D221F #4B7D1F #1F7A7D
split-complementary
#511F7D #7A7D1F #1F7D22
monochromatic
#11071B #31134C #511F7D #712BAE #9045D1

Accessibility & contrast

On white

11.40
#511F7D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.84
#511F7D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #511F7D
11.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##511F7D#FFFFFF#000000##FFFFFF
##511F7D1.0011.401.8411.40
#FFFFFF11.401.0021.001.00
#0000001.8421.001.0021.00
##FFFFFF11.401.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003980
Deuteranopia (green-blind)
#003A7B
Tritanopia (blue-blind)
#48364C
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #511f7d;
/* rgb */ color: rgb(81, 31, 125);
/* oklch */ color: oklch(36.6% 0.150 304.1);
Tailwind
colors: {
  custom: {
    50: '#8660a3',
    500: '#511f7d',
    950: '#000000',
  },
}
SCSS
$custom: #511f7d;
$custom-light: #8660a3;
$custom-dark: #000000;
JSON
{
  "hex": "#511f7d",
  "rgb": {
    "r": 81,
    "g": 31,
    "b": 125
  },
  "hsl": {
    "h": 271.915,
    "s": 60.256,
    "l": 30.588
  },
  "oklch": {
    "l": 0.36633,
    "c": 0.15032,
    "h": 304.1
  },
  "luminance": 0.0421
}

Semantic roles & 50–950 ramp

primary
#511F7D
secondary
#79B048
accent
#E3448F
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C050F
muted
#7D797F

Preview Lab

Preview with #511F7D

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

Preview Lab → · Contrast checker → · Palette generator →

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