#512161#512161

#512161 is a dark, moderate purple. Relative luminance 0.037; OKLCH L 34.8% C 0.116 H 316.8°. Best body text is #FFFFFF at 12.07:1 contrast (WCAG AA passes).

Color values

HEX#512161
RGBrgb(81, 33, 97)
HSLhsl(285, 49%, 25%)
HSVhsv(285, 66%, 38%)
CMYKcmyk(16.5%, 66%, 0%, 62%)
CIE-LABlab(22.65, 33.51, -28.44)
CIE-LCHlch(22.65, 43.95, 319.68°)
OKLaboklab(34.76% 0.0847 -0.0796)
OKLCHoklch(34.76% 0.116 316.8)
XYZxyz(6.0945, 3.7003, 11.7001)
Luminance0.0370 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512161 #316121
analogous
#312161 #512161 #612151
triadic
#512161 #615121 #216151
tetradic
#512161 #613121 #316121 #215161
square
#512161 #613121 #316121 #215161
split-complementary
#512161 #516121 #216131
monochromatic
#130817 #2B1133 #512161 #77318F #9D40BC

Accessibility & contrast

On white

12.07
#512161 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#512161 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512161
12.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512161#FFFFFF#000000##FFFFFF
##5121611.0012.071.7412.07
#FFFFFF12.071.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0D3363
Deuteranopia (green-blind)
#22385F
Tritanopia (blue-blind)
#502C3D
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #512161;
/* rgb */ color: rgb(81, 33, 97);
/* oklch */ color: oklch(34.8% 0.116 316.8);
Tailwind
colors: {
  custom: {
    50: '#84608e',
    500: '#512161',
    950: '#000000',
  },
}
SCSS
$custom: #512161;
$custom-light: #84608e;
$custom-dark: #000000;
JSON
{
  "hex": "#512161",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 97
  },
  "hsl": {
    "h": 285,
    "s": 49.231,
    "l": 25.49
  },
  "oklch": {
    "l": 0.34762,
    "c": 0.1162,
    "h": 316.8
  },
  "luminance": 0.037
}

Semantic roles & 50–950 ramp

primary
#512161
secondary
#5C9549
accent
#D94F71
background
#F8F5F8
surface
#EFE9F0
border
#CAC5CB
text
#0B050C
muted
#7C797D

Preview Lab

Preview with #512161

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

Preview Lab → · Contrast checker → · Palette generator →

#512161 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva