#511F8C#511F8C

#511F8C is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.9% C 0.167 H 298.9°. Best body text is #FFFFFF at 10.91:1 contrast (WCAG AA passes).

Color values

HEX#511F8C
RGBrgb(81, 31, 140)
HSLhsl(268, 64%, 34%)
HSVhsv(268, 78%, 55%)
CMYKcmyk(42.1%, 77.9%, 0%, 45.1%)
CIE-LABlab(25.63, 45.16, -51.09)
CIE-LCHlch(25.63, 68.19, 311.48°)
OKLaboklab(37.93% 0.0806 -0.1461)
OKLCHoklch(37.93% 0.167 298.9)
XYZxyz(8.6157, 4.6226, 25.2442)
Luminance0.0462 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#511F8C #5A8C1F
analogous
#1F238C #511F8C #871F8C
triadic
#511F8C #8C511F #1F8C51
tetradic
#511F8C #8C1F23 #5A8C1F #1F8C87
square
#511F8C #8C1F23 #5A8C1F #1F8C87
split-complementary
#511F8C #8C871F #238C1F
monochromatic
#170928 #34145A #511F8C #6E2ABE #8D4ED8

Accessibility & contrast

On white

10.91
#511F8C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#511F8C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #511F8C
10.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##511F8C#FFFFFF#000000##FFFFFF
##511F8C1.0010.911.9210.91
#FFFFFF10.911.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D8F
Deuteranopia (green-blind)
#003C8A
Tritanopia (blue-blind)
#433C54
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #511f8c;
/* rgb */ color: rgb(81, 31, 140);
/* oklch */ color: oklch(37.9% 0.167 298.9);
Tailwind
colors: {
  custom: {
    50: '#8860ae',
    500: '#511f8c',
    950: '#000000',
  },
}
SCSS
$custom: #511f8c;
$custom-light: #8860ae;
$custom-dark: #000000;
JSON
{
  "hex": "#511f8c",
  "rgb": {
    "r": 81,
    "g": 31,
    "b": 140
  },
  "hsl": {
    "h": 267.523,
    "s": 63.743,
    "l": 33.529
  },
  "oklch": {
    "l": 0.37931,
    "c": 0.16686,
    "h": 298.9
  },
  "luminance": 0.04623
}

Semantic roles & 50–950 ramp

primary
#511F8C
secondary
#88BB4C
accent
#E7419B
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C0510
muted
#7D797F

Preview Lab

Preview with #511F8C

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

Preview Lab → · Contrast checker → · Palette generator →

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