#512781#512781

#512781 is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.0% C 0.144 H 301.1°. Best body text is #FFFFFF at 10.73:1 contrast (WCAG AA passes).

Color values

HEX#512781
RGBrgb(81, 39, 129)
HSLhsl(268, 54%, 33%)
HSVhsv(268, 70%, 51%)
CMYKcmyk(37.2%, 69.8%, 0%, 49.4%)
CIE-LABlab(26.11, 38.33, -43.42)
CIE-LCHlch(26.11, 57.92, 311.43°)
OKLaboklab(37.99% 0.0747 -0.1236)
OKLCHoklch(37.99% 0.144 301.1)
XYZxyz(8.0803, 4.7853, 21.2626)
Luminance0.0478 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512781 #578127
analogous
#272A81 #512781 #7E2781
triadic
#512781 #815127 #278151
tetradic
#512781 #81272A #578127 #27817E
square
#512781 #81272A #578127 #27817E
split-complementary
#512781 #817E27 #2A8127
monochromatic
#160B23 #331952 #512781 #6F35B0 #8D56CC

Accessibility & contrast

On white

10.73
#512781 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#512781 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512781
10.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512781#FFFFFF#000000##FFFFFF
##5127811.0010.731.9610.73
#FFFFFF10.731.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D84
Deuteranopia (green-blind)
#003D7F
Tritanopia (blue-blind)
#473C50
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #512781;
/* rgb */ color: rgb(81, 39, 129);
/* oklch */ color: oklch(38.0% 0.144 301.1);
Tailwind
colors: {
  custom: {
    50: '#8664a6',
    500: '#512781',
    950: '#000000',
  },
}
SCSS
$custom: #512781;
$custom-light: #8664a6;
$custom-dark: #000000;
JSON
{
  "hex": "#512781",
  "rgb": {
    "r": 81,
    "g": 39,
    "b": 129
  },
  "hsl": {
    "h": 268,
    "s": 53.571,
    "l": 32.941
  },
  "oklch": {
    "l": 0.37988,
    "c": 0.14442,
    "h": 301.1
  },
  "luminance": 0.04785
}

Semantic roles & 50–950 ramp

primary
#512781
secondary
#85B153
accent
#DD4B99
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C060F
muted
#7D7A7F

Preview Lab

Preview with #512781

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

Preview Lab → · Contrast checker → · Palette generator →

#512781 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva