#512B87#512B87

#512B87 is a dark, vivid violet. Relative luminance 0.052; OKLCH L 39.0% C 0.146 H 298.3°. Best body text is #FFFFFF at 10.27:1 contrast (WCAG AA passes).

Color values

HEX#512B87
RGBrgb(81, 43, 135)
HSLhsl(265, 52%, 35%)
HSVhsv(265, 68%, 53%)
CMYKcmyk(40%, 68.1%, 0%, 47.1%)
CIE-LABlab(27.37, 37.79, -45.14)
CIE-LCHlch(27.37, 58.87, 309.93°)
OKLaboklab(39.04% 0.0693 -0.1287)
OKLCHoklch(39.04% 0.146 298.3)
XYZxyz(8.6293, 5.2262, 23.4711)
Luminance0.0523 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512B87 #61872B
analogous
#2B3387 #512B87 #7F2B87
triadic
#512B87 #87512B #2B8751
tetradic
#512B87 #872B33 #61872B #2B877F
square
#512B87 #872B33 #61872B #2B877F
split-complementary
#512B87 #877F2B #33872B
monochromatic
#190D2A #351C59 #512B87 #6D3AB5 #8D60CC

Accessibility & contrast

On white

10.27
#512B87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.05
#512B87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512B87
10.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512B87#FFFFFF#000000##FFFFFF
##512B871.0010.272.0510.27
#FFFFFF10.271.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00418A
Deuteranopia (green-blind)
#004085
Tritanopia (blue-blind)
#444055
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #512b87;
/* rgb */ color: rgb(81, 43, 135);
/* oklch */ color: oklch(39.0% 0.146 298.3);
Tailwind
colors: {
  custom: {
    50: '#8667ab',
    500: '#512b87',
    950: '#000000',
  },
}
SCSS
$custom: #512b87;
$custom-light: #8667ab;
$custom-dark: #000000;
JSON
{
  "hex": "#512b87",
  "rgb": {
    "r": 81,
    "g": 43,
    "b": 135
  },
  "hsl": {
    "h": 264.783,
    "s": 51.685,
    "l": 34.902
  },
  "oklch": {
    "l": 0.39036,
    "c": 0.14614,
    "h": 298.3
  },
  "luminance": 0.05226
}

Semantic roles & 50–950 ramp

primary
#512B87
secondary
#8EB25B
accent
#DB4DA0
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512B87

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

Preview Lab → · Contrast checker → · Palette generator →

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