#512986#512986

#512986 is a dark, vivid violet. Relative luminance 0.051; OKLCH L 38.7% C 0.148 H 299.0°. Best body text is #FFFFFF at 10.44:1 contrast (WCAG AA passes).

Color values

HEX#512986
RGBrgb(81, 41, 134)
HSLhsl(266, 53%, 34%)
HSVhsv(266, 69%, 53%)
CMYKcmyk(39.6%, 69.4%, 0%, 47.5%)
CIE-LABlab(26.89, 38.60, -45.29)
CIE-LCHlch(26.89, 59.51, 310.44°)
OKLaboklab(38.67% 0.0717 -0.1291)
OKLCHoklch(38.67% 0.148 299)
XYZxyz(8.4883, 5.0563, 23.0784)
Luminance0.0506 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512986 #5E8629
analogous
#293086 #512986 #802986
triadic
#512986 #865129 #298651
tetradic
#512986 #862930 #5E8629 #298680
square
#512986 #862930 #5E8629 #298680
split-complementary
#512986 #868029 #308629
monochromatic
#180C28 #351B57 #512986 #6D37B5 #8D5CCD

Accessibility & contrast

On white

10.44
#512986 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.01
#512986 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512986
10.44:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512986#FFFFFF#000000##FFFFFF
##5129861.0010.442.0110.44
#FFFFFF10.441.0021.001.00
#0000002.0121.001.0021.00
##FFFFFF10.441.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004089
Deuteranopia (green-blind)
#003F84
Tritanopia (blue-blind)
#453F54
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #512986;
/* rgb */ color: rgb(81, 41, 134);
/* oklch */ color: oklch(38.7% 0.148 299.0);
Tailwind
colors: {
  custom: {
    50: '#8766aa',
    500: '#512986',
    950: '#000000',
  },
}
SCSS
$custom: #512986;
$custom-light: #8766aa;
$custom-dark: #000000;
JSON
{
  "hex": "#512986",
  "rgb": {
    "r": 81,
    "g": 41,
    "b": 134
  },
  "hsl": {
    "h": 265.806,
    "s": 53.143,
    "l": 34.314
  },
  "oklch": {
    "l": 0.38671,
    "c": 0.14768,
    "h": 299
  },
  "luminance": 0.05056
}

Semantic roles & 50–950 ramp

primary
#512986
secondary
#8CB358
accent
#DD4B9E
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512986

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

Preview Lab → · Contrast checker → · Palette generator →

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