#512F87#512F87

#512F87 is a dark, vivid violet. Relative luminance 0.055; OKLCH L 39.6% C 0.140 H 297.4°. Best body text is #FFFFFF at 9.97:1 contrast (WCAG AA passes).

Color values

HEX#512F87
RGBrgb(81, 47, 135)
HSLhsl(263, 48%, 36%)
HSVhsv(263, 65%, 53%)
CMYKcmyk(40%, 65.2%, 0%, 47.1%)
CIE-LABlab(28.20, 35.53, -43.80)
CIE-LCHlch(28.20, 56.40, 309.05°)
OKLaboklab(39.63% 0.0645 -0.1247)
OKLCHoklch(39.63% 0.14 297.4)
XYZxyz(8.7819, 5.5315, 23.5220)
Luminance0.0553 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512F87 #65872F
analogous
#2F3987 #512F87 #7D2F87
triadic
#512F87 #87512F #2F8751
tetradic
#512F87 #872F39 #65872F #2F877D
square
#512F87 #872F39 #65872F #2F877D
split-complementary
#512F87 #877D2F #39872F
monochromatic
#1B0F2C #361F5A #512F87 #6C3FB4 #8D66CA

Accessibility & contrast

On white

9.97
#512F87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.11
#512F87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512F87
9.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512F87#FFFFFF#000000##FFFFFF
##512F871.009.972.119.97
#FFFFFF9.971.0021.001.00
#0000002.1121.001.0021.00
##FFFFFF9.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00438A
Deuteranopia (green-blind)
#004185
Tritanopia (blue-blind)
#444356
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #512f87;
/* rgb */ color: rgb(81, 47, 135);
/* oklch */ color: oklch(39.6% 0.140 297.4);
Tailwind
colors: {
  custom: {
    50: '#8669ab',
    500: '#512f87',
    950: '#000000',
  },
}
SCSS
$custom: #512f87;
$custom-light: #8669ab;
$custom-dark: #000000;
JSON
{
  "hex": "#512f87",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 135
  },
  "hsl": {
    "h": 263.182,
    "s": 48.352,
    "l": 35.686
  },
  "oklch": {
    "l": 0.39634,
    "c": 0.14045,
    "h": 297.4
  },
  "luminance": 0.05532
}

Semantic roles & 50–950 ramp

primary
#512F87
secondary
#92B161
accent
#D850A3
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512F87

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

Preview Lab → · Contrast checker → · Palette generator →

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