#512D87#512D87

#512D87 is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.3% C 0.143 H 297.8°. Best body text is #FFFFFF at 10.12:1 contrast (WCAG AA passes).

Color values

HEX#512D87
RGBrgb(81, 45, 135)
HSLhsl(264, 50%, 35%)
HSVhsv(264, 67%, 53%)
CMYKcmyk(40%, 66.7%, 0%, 47.1%)
CIE-LABlab(27.78, 36.67, -44.48)
CIE-LCHlch(27.78, 57.65, 309.50°)
OKLaboklab(39.33% 0.0669 -0.1267)
OKLCHoklch(39.33% 0.143 297.8)
XYZxyz(8.7038, 5.3752, 23.4959)
Luminance0.0537 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512D87 #63872D
analogous
#2D3687 #512D87 #7E2D87
triadic
#512D87 #87512D #2D8751
tetradic
#512D87 #872D36 #63872D #2D877E
square
#512D87 #872D36 #63872D #2D877E
split-complementary
#512D87 #877E2D #36872D
monochromatic
#1A0E2B #351E59 #512D87 #6D3CB5 #8D63CB

Accessibility & contrast

On white

10.12
#512D87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.08
#512D87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512D87
10.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512D87#FFFFFF#000000##FFFFFF
##512D871.0010.122.0810.12
#FFFFFF10.121.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00428A
Deuteranopia (green-blind)
#004185
Tritanopia (blue-blind)
#444256
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #512d87;
/* rgb */ color: rgb(81, 45, 135);
/* oklch */ color: oklch(39.3% 0.143 297.8);
Tailwind
colors: {
  custom: {
    50: '#8668ab',
    500: '#512d87',
    950: '#000000',
  },
}
SCSS
$custom: #512d87;
$custom-light: #8668ab;
$custom-dark: #000000;
JSON
{
  "hex": "#512d87",
  "rgb": {
    "r": 81,
    "g": 45,
    "b": 135
  },
  "hsl": {
    "h": 264,
    "s": 50,
    "l": 35.294
  },
  "oklch": {
    "l": 0.39331,
    "c": 0.14334,
    "h": 297.8
  },
  "luminance": 0.05375
}

Semantic roles & 50–950 ramp

primary
#512D87
secondary
#90B25E
accent
#DA4EA2
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512D87

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

Preview Lab → · Contrast checker → · Palette generator →

#512D87 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva