#512F8D#512F8D

#512F8D is a dark, vivid violet. Relative luminance 0.057; OKLCH L 40.1% C 0.148 H 295.6°. Best body text is #FFFFFF at 9.81:1 contrast (WCAG AA passes).

Color values

HEX#512F8D
RGBrgb(81, 47, 141)
HSLhsl(262, 50%, 37%)
HSVhsv(262, 67%, 55%)
CMYKcmyk(42.6%, 66.7%, 0%, 44.7%)
CIE-LABlab(28.66, 37.22, -46.78)
CIE-LCHlch(28.66, 59.79, 308.51°)
OKLaboklab(40.11% 0.0639 -0.1335)
OKLCHoklch(40.11% 0.148 295.6)
XYZxyz(9.2163, 5.7052, 25.8098)
Luminance0.0570 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512F8D #6B8D2F
analogous
#2F3C8D #512F8D #802F8D
triadic
#512F8D #8D512F #2F8D51
tetradic
#512F8D #8D2F3C #6B8D2F #2F8D80
square
#512F8D #8D2F3C #6B8D2F #2F8D80
split-complementary
#512F8D #8D802F #3C8D2F
monochromatic
#1C1031 #37205F #512F8D #6B3EBB #8D69CD

Accessibility & contrast

On white

9.81
#512F8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.14
#512F8D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512F8D
9.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512F8D#FFFFFF#000000##FFFFFF
##512F8D1.009.812.149.81
#FFFFFF9.811.0021.001.00
#0000002.1421.001.0021.00
##FFFFFF9.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004490
Deuteranopia (green-blind)
#00428B
Tritanopia (blue-blind)
#414559
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #512f8d;
/* rgb */ color: rgb(81, 47, 141);
/* oklch */ color: oklch(40.1% 0.148 295.6);
Tailwind
colors: {
  custom: {
    50: '#876aaf',
    500: '#512f8d',
    950: '#000000',
  },
}
SCSS
$custom: #512f8d;
$custom-light: #876aaf;
$custom-dark: #000000;
JSON
{
  "hex": "#512f8d",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 141
  },
  "hsl": {
    "h": 261.702,
    "s": 50,
    "l": 36.863
  },
  "oklch": {
    "l": 0.4011,
    "c": 0.14804,
    "h": 295.6
  },
  "luminance": 0.05705
}

Semantic roles & 50–950 ramp

primary
#512F8D
secondary
#97B464
accent
#DA4EA7
background
#F8F6FA
surface
#F0EBF5
border
#CBC6CF
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512F8D

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

Preview Lab → · Contrast checker → · Palette generator →

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