#512687#512687

#512687 is a dark, vivid violet. Relative luminance 0.049; OKLCH L 38.3% C 0.153 H 299.3°. Best body text is #FFFFFF at 10.62:1 contrast (WCAG AA passes).

Color values

HEX#512687
RGBrgb(81, 38, 135)
HSLhsl(267, 56%, 34%)
HSVhsv(267, 72%, 53%)
CMYKcmyk(40%, 71.9%, 0%, 47.1%)
CIE-LABlab(26.40, 40.46, -46.71)
CIE-LCHlch(26.40, 61.80, 310.90°)
OKLaboklab(38.35% 0.0748 -0.1333)
OKLCHoklch(38.35% 0.153 299.3)
XYZxyz(8.4585, 4.8847, 23.4142)
Luminance0.0488 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512687 #5C8726
analogous
#262C87 #512687 #822687
triadic
#512687 #875126 #268751
tetradic
#512687 #87262C #5C8726 #268782
square
#512687 #87262C #5C8726 #268782
split-complementary
#512687 #878226 #2C8726
monochromatic
#180B27 #341957 #512687 #6E33B7 #8D58D0

Accessibility & contrast

On white

10.62
#512687 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512687
10.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512687#FFFFFF#000000##FFFFFF
##5126871.0010.621.9810.62
#FFFFFF10.621.0021.001.00
#0000001.9821.001.0021.00
##FFFFFF10.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E8A
Deuteranopia (green-blind)
#003E85
Tritanopia (blue-blind)
#443D53
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #512687;
/* rgb */ color: rgb(81, 38, 135);
/* oklch */ color: oklch(38.3% 0.153 299.3);
Tailwind
colors: {
  custom: {
    50: '#8764ab',
    500: '#512687',
    950: '#000000',
  },
}
SCSS
$custom: #512687;
$custom-light: #8764ab;
$custom-dark: #000000;
JSON
{
  "hex": "#512687",
  "rgb": {
    "r": 81,
    "g": 38,
    "b": 135
  },
  "hsl": {
    "h": 266.598,
    "s": 56.069,
    "l": 33.922
  },
  "oklch": {
    "l": 0.38345,
    "c": 0.15285,
    "h": 299.3
  },
  "luminance": 0.04885
}

Semantic roles & 50–950 ramp

primary
#512687
secondary
#8AB554
accent
#DF489C
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512687

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

Preview Lab → · Contrast checker → · Palette generator →

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