#512987#512987

#512987 is a dark, vivid violet. Relative luminance 0.051; OKLCH L 38.8% C 0.149 H 298.7°. Best body text is #FFFFFF at 10.41:1 contrast (WCAG AA passes).

Color values

HEX#512987
RGBrgb(81, 41, 135)
HSLhsl(266, 53%, 35%)
HSVhsv(266, 70%, 53%)
CMYKcmyk(40%, 69.6%, 0%, 47.1%)
CIE-LABlab(26.97, 38.87, -45.79)
CIE-LCHlch(26.97, 60.06, 310.33°)
OKLaboklab(38.75% 0.0715 -0.1306)
OKLCHoklch(38.75% 0.149 298.7)
XYZxyz(8.5583, 5.0844, 23.4475)
Luminance0.0508 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512987 #5F8729
analogous
#293087 #512987 #802987
triadic
#512987 #875129 #298751
tetradic
#512987 #872930 #5F8729 #298780
square
#512987 #872930 #5F8729 #298780
split-complementary
#512987 #878029 #308729
monochromatic
#190C29 #351B58 #512987 #6D37B6 #8D5DCE

Accessibility & contrast

On white

10.41
#512987 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.02
#512987 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512987
10.41:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512987#FFFFFF#000000##FFFFFF
##5129871.0010.412.0210.41
#FFFFFF10.411.0021.001.00
#0000002.0221.001.0021.00
##FFFFFF10.411.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00408A
Deuteranopia (green-blind)
#003F85
Tritanopia (blue-blind)
#443F54
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #512987;
/* rgb */ color: rgb(81, 41, 135);
/* oklch */ color: oklch(38.8% 0.149 298.7);
Tailwind
colors: {
  custom: {
    50: '#8766ab',
    500: '#512987',
    950: '#000000',
  },
}
SCSS
$custom: #512987;
$custom-light: #8766ab;
$custom-dark: #000000;
JSON
{
  "hex": "#512987",
  "rgb": {
    "r": 81,
    "g": 41,
    "b": 135
  },
  "hsl": {
    "h": 265.532,
    "s": 53.409,
    "l": 34.51
  },
  "oklch": {
    "l": 0.38752,
    "c": 0.14888,
    "h": 298.7
  },
  "luminance": 0.05084
}

Semantic roles & 50–950 ramp

primary
#512987
secondary
#8DB359
accent
#DD4B9F
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512987

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

Preview Lab → · Contrast checker → · Palette generator →

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