#512A8A#512A8A

#512A8A is a dark, vivid violet. Relative luminance 0.052; OKLCH L 39.1% C 0.151 H 297.6°. Best body text is #FFFFFF at 10.25:1 contrast (WCAG AA passes).

Color values

HEX#512A8A
RGBrgb(81, 42, 138)
HSLhsl(264, 53%, 35%)
HSVhsv(264, 70%, 54%)
CMYKcmyk(41.3%, 69.6%, 0%, 45.9%)
CIE-LABlab(27.41, 39.16, -46.95)
CIE-LCHlch(27.41, 61.13, 309.83°)
OKLaboklab(39.14% 0.07 -0.134)
OKLCHoklch(39.14% 0.151 297.6)
XYZxyz(8.8076, 5.2401, 24.5872)
Luminance0.0524 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512A8A #638A2A
analogous
#2A338A #512A8A #812A8A
triadic
#512A8A #8A512A #2A8A51
tetradic
#512A8A #8A2A33 #638A2A #2A8A81
square
#512A8A #8A2A33 #638A2A #2A8A81
split-complementary
#512A8A #8A812A #338A2A
monochromatic
#1A0D2C #351C5B #512A8A #6D38B9 #8D60CF

Accessibility & contrast

On white

10.25
#512A8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512A8A
10.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512A8A#FFFFFF#000000##FFFFFF
##512A8A1.0010.252.0510.25
#FFFFFF10.251.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00418D
Deuteranopia (green-blind)
#004088
Tritanopia (blue-blind)
#434156
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #512a8a;
/* rgb */ color: rgb(81, 42, 138);
/* oklch */ color: oklch(39.1% 0.151 297.6);
Tailwind
colors: {
  custom: {
    50: '#8766ad',
    500: '#512a8a',
    950: '#000000',
  },
}
SCSS
$custom: #512a8a;
$custom-light: #8766ad;
$custom-dark: #000000;
JSON
{
  "hex": "#512a8a",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 138
  },
  "hsl": {
    "h": 264.375,
    "s": 53.333,
    "l": 35.294
  },
  "oklch": {
    "l": 0.39138,
    "c": 0.15116,
    "h": 297.6
  },
  "luminance": 0.0524
}

Semantic roles & 50–950 ramp

primary
#512A8A
secondary
#90B45B
accent
#DD4BA2
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512A8A

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

Preview Lab → · Contrast checker → · Palette generator →

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