#512A79#512A79

#512A79 is a dark, vivid violet. Relative luminance 0.048; OKLCH L 37.8% C 0.130 H 303.4°. Best body text is #FFFFFF at 10.73:1 contrast (WCAG AA passes).

Color values

HEX#512A79
RGBrgb(81, 42, 121)
HSLhsl(270, 48%, 32%)
HSVhsv(270, 65%, 47%)
CMYKcmyk(33.1%, 65.3%, 0%, 52.5%)
CIE-LABlab(26.12, 34.55, -38.37)
CIE-LCHlch(26.12, 51.63, 312.00°)
OKLaboklab(37.8% 0.0718 -0.1088)
OKLCHoklch(37.8% 0.13 303.4)
XYZxyz(7.6717, 4.7857, 18.6050)
Luminance0.0479 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512A79 #52792A
analogous
#2A2B79 #512A79 #792A79
triadic
#512A79 #79512A #2A7951
tetradic
#512A79 #792A2B #52792A #2A7979
square
#512A79 #792A2B #52792A #2A7979
split-complementary
#512A79 #79792A #2B792A
monochromatic
#140A1E #331A4C #512A79 #6F3AA6 #8E58C5

Accessibility & contrast

On white

10.73
#512A79 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#512A79 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512A79
10.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512A79#FFFFFF#000000##FFFFFF
##512A791.0010.731.9610.73
#FFFFFF10.731.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D7B
Deuteranopia (green-blind)
#133E77
Tritanopia (blue-blind)
#493B4D
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #512a79;
/* rgb */ color: rgb(81, 42, 121);
/* oklch */ color: oklch(37.8% 0.130 303.4);
Tailwind
colors: {
  custom: {
    50: '#8566a0',
    500: '#512a79',
    950: '#000000',
  },
}
SCSS
$custom: #512a79;
$custom-light: #8566a0;
$custom-dark: #000000;
JSON
{
  "hex": "#512a79",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 121
  },
  "hsl": {
    "h": 269.62,
    "s": 48.466,
    "l": 31.961
  },
  "oklch": {
    "l": 0.37798,
    "c": 0.13035,
    "h": 303.4
  },
  "luminance": 0.04786
}

Semantic roles & 50–950 ramp

primary
#512A79
secondary
#80AB54
accent
#D85095
background
#F8F6F9
surface
#F0EBF2
border
#CBC6CC
text
#0B060F
muted
#7C7A7E

Preview Lab

Preview with #512A79

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

Preview Lab → · Contrast checker → · Palette generator →

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