#512F8A#512F8A

#512F8A is a dark, vivid violet. Relative luminance 0.056; OKLCH L 39.9% C 0.144 H 296.4°. Best body text is #FFFFFF at 9.89:1 contrast (WCAG AA passes).

Color values

HEX#512F8A
RGBrgb(81, 47, 138)
HSLhsl(262, 49%, 36%)
HSVhsv(262, 66%, 54%)
CMYKcmyk(41.3%, 65.9%, 0%, 45.9%)
CIE-LABlab(28.43, 36.38, -45.30)
CIE-LCHlch(28.43, 58.10, 308.76°)
OKLaboklab(39.87% 0.0643 -0.1291)
OKLCHoklch(39.87% 0.144 296.4)
XYZxyz(8.9961, 5.6172, 24.6501)
Luminance0.0562 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512F8A #688A2F
analogous
#2F3B8A #512F8A #7F2F8A
triadic
#512F8A #8A512F #2F8A51
tetradic
#512F8A #8A2F3B #688A2F #2F8A7F
square
#512F8A #8A2F3B #688A2F #2F8A7F
split-complementary
#512F8A #8A7F2F #3B8A2F
monochromatic
#1B102F #361F5C #512F8A #6C3FB8 #8D68CC

Accessibility & contrast

On white

9.89
#512F8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.12
#512F8A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512F8A
9.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512F8A#FFFFFF#000000##FFFFFF
##512F8A1.009.892.129.89
#FFFFFF9.891.0021.001.00
#0000002.1221.001.0021.00
##FFFFFF9.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00448D
Deuteranopia (green-blind)
#004288
Tritanopia (blue-blind)
#434458
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #512f8a;
/* rgb */ color: rgb(81, 47, 138);
/* oklch */ color: oklch(39.9% 0.144 296.4);
Tailwind
colors: {
  custom: {
    50: '#876aad',
    500: '#512f8a',
    950: '#000000',
  },
}
SCSS
$custom: #512f8a;
$custom-light: #876aad;
$custom-dark: #000000;
JSON
{
  "hex": "#512f8a",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 138
  },
  "hsl": {
    "h": 262.418,
    "s": 49.189,
    "l": 36.275
  },
  "oklch": {
    "l": 0.3987,
    "c": 0.14425,
    "h": 296.4
  },
  "luminance": 0.05617
}

Semantic roles & 50–950 ramp

primary
#512F8A
secondary
#95B362
accent
#D94FA5
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512F8A

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

Preview Lab → · Contrast checker → · Palette generator →

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