#512786#512786

#512786 is a dark, vivid violet. Relative luminance 0.049; OKLCH L 38.4% C 0.150 H 299.4°. Best body text is #FFFFFF at 10.58:1 contrast (WCAG AA passes).

Color values

HEX#512786
RGBrgb(81, 39, 134)
HSLhsl(267, 55%, 34%)
HSVhsv(267, 71%, 53%)
CMYKcmyk(39.6%, 70.9%, 0%, 47.5%)
CIE-LABlab(26.51, 39.67, -45.91)
CIE-LCHlch(26.51, 60.68, 310.83°)
OKLaboklab(38.4% 0.0739 -0.1309)
OKLCHoklch(38.4% 0.15 299.4)
XYZxyz(8.4209, 4.9215, 23.0559)
Luminance0.0492 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512786 #5C8627
analogous
#272D86 #512786 #812786
triadic
#512786 #865127 #278651
tetradic
#512786 #86272D #5C8627 #278681
square
#512786 #86272D #5C8627 #278681
split-complementary
#512786 #868127 #2D8627
monochromatic
#180B27 #341957 #512786 #6E35B5 #8D59CF

Accessibility & contrast

On white

10.58
#512786 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.98
#512786 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512786
10.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512786#FFFFFF#000000##FFFFFF
##5127861.0010.581.9810.58
#FFFFFF10.581.0021.001.00
#0000001.9821.001.0021.00
##FFFFFF10.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F89
Deuteranopia (green-blind)
#003E84
Tritanopia (blue-blind)
#453E53
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #512786;
/* rgb */ color: rgb(81, 39, 134);
/* oklch */ color: oklch(38.4% 0.150 299.4);
Tailwind
colors: {
  custom: {
    50: '#8765aa',
    500: '#512786',
    950: '#000000',
  },
}
SCSS
$custom: #512786;
$custom-light: #8765aa;
$custom-dark: #000000;
JSON
{
  "hex": "#512786",
  "rgb": {
    "r": 81,
    "g": 39,
    "b": 134
  },
  "hsl": {
    "h": 266.526,
    "s": 54.913,
    "l": 33.922
  },
  "oklch": {
    "l": 0.38395,
    "c": 0.15036,
    "h": 299.4
  },
  "luminance": 0.04922
}

Semantic roles & 50–950 ramp

primary
#512786
secondary
#8AB455
accent
#DE4A9D
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512786

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

Preview Lab → · Contrast checker → · Palette generator →

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