#512A71#512A71

#512A71 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.2% C 0.120 H 306.8°. Best body text is #FFFFFF at 10.94:1 contrast (WCAG AA passes).

Color values

HEX#512A71
RGBrgb(81, 42, 113)
HSLhsl(273, 46%, 30%)
HSVhsv(273, 63%, 44%)
CMYKcmyk(28.3%, 62.8%, 0%, 55.7%)
CIE-LABlab(25.56, 32.45, -34.17)
CIE-LCHlch(25.56, 47.13, 313.52°)
OKLaboklab(37.21% 0.0721 -0.0964)
OKLCHoklch(37.21% 0.12 306.8)
XYZxyz(7.2013, 4.5976, 16.1276)
Luminance0.0460 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512A71 #4A712A
analogous
#2E2A71 #512A71 #712A6D
triadic
#512A71 #71512A #2A7151
tetradic
#512A71 #712E2A #4A712A #2A6D71
square
#512A71 #712E2A #4A712A #2A6D71
split-complementary
#512A71 #6D712A #2A712E
monochromatic
#110918 #311944 #512A71 #713B9E #9055C0

Accessibility & contrast

On white

10.94
#512A71 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#512A71 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512A71
10.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512A71#FFFFFF#000000##FFFFFF
##512A711.0010.941.9210.94
#FFFFFF10.941.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0A3B73
Deuteranopia (green-blind)
#1D3D6F
Tritanopia (blue-blind)
#4C3849
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #512a71;
/* rgb */ color: rgb(81, 42, 113);
/* oklch */ color: oklch(37.2% 0.120 306.8);
Tailwind
colors: {
  custom: {
    50: '#84669a',
    500: '#512a71',
    950: '#000000',
  },
}
SCSS
$custom: #512a71;
$custom-light: #84669a;
$custom-dark: #000000;
JSON
{
  "hex": "#512a71",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 113
  },
  "hsl": {
    "h": 272.958,
    "s": 45.806,
    "l": 30.392
  },
  "oklch": {
    "l": 0.37213,
    "c": 0.12044,
    "h": 306.8
  },
  "luminance": 0.04598
}

Semantic roles & 50–950 ramp

primary
#512A71
secondary
#77A354
accent
#D5528D
background
#F8F6F9
surface
#EFEBF2
border
#CAC6CC
text
#0B060E
muted
#7C7A7E

Preview Lab

Preview with #512A71

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

Preview Lab → · Contrast checker → · Palette generator →

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