#512899#512899

#512899 is a dark, vivid violet. Relative luminance 0.056; OKLCH L 40.2% C 0.171 H 293.8°. Best body text is #FFFFFF at 9.94:1 contrast (WCAG AA passes).

Color values

HEX#512899
RGBrgb(81, 40, 153)
HSLhsl(262, 59%, 38%)
HSVhsv(262, 74%, 60%)
CMYKcmyk(47.1%, 73.9%, 0%, 40%)
CIE-LABlab(28.29, 44.34, -54.76)
CIE-LCHlch(28.29, 70.46, 309.00°)
OKLaboklab(40.16% 0.0691 -0.1569)
OKLCHoklch(40.16% 0.171 293.8)
XYZxyz(9.9003, 5.5665, 30.6836)
Luminance0.0557 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512899 #709928
analogous
#283799 #512899 #892899
triadic
#512899 #995128 #289951
tetradic
#512899 #992837 #709928 #289989
square
#512899 #992837 #709928 #289989
split-complementary
#512899 #998928 #379928
monochromatic
#1E0F38 #371B68 #512899 #6B35CA #8E65D7

Accessibility & contrast

On white

9.94
#512899 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.11
#512899 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512899
9.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512899#FFFFFF#000000##FFFFFF
##5128991.009.942.119.94
#FFFFFF9.941.0021.001.00
#0000002.1121.001.0021.00
##FFFFFF9.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00449C
Deuteranopia (green-blind)
#004197
Tritanopia (blue-blind)
#3C455E
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #512899;
/* rgb */ color: rgb(81, 40, 153);
/* oklch */ color: oklch(40.2% 0.171 293.8);
Tailwind
colors: {
  custom: {
    50: '#8966b8',
    500: '#512899',
    950: '#000000',
  },
}
SCSS
$custom: #512899;
$custom-light: #8966b8;
$custom-dark: #000000;
JSON
{
  "hex": "#512899",
  "rgb": {
    "r": 81,
    "g": 40,
    "b": 153
  },
  "hsl": {
    "h": 261.77,
    "s": 58.549,
    "l": 37.843
  },
  "oklch": {
    "l": 0.40159,
    "c": 0.17149,
    "h": 293.8
  },
  "luminance": 0.05567
}

Semantic roles & 50–950 ramp

primary
#512899
secondary
#9BBD60
accent
#E246A9
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512899

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

Preview Lab → · Contrast checker → · Palette generator →

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