#512162#512162

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

Color values

HEX#512162
RGBrgb(81, 33, 98)
HSLhsl(284, 50%, 26%)
HSVhsv(284, 66%, 38%)
CMYKcmyk(17.3%, 66.3%, 0%, 61.6%)
CIE-LABlab(22.72, 33.74, -28.99)
CIE-LCHlch(22.72, 44.48, 319.33°)
OKLaboklab(34.83% 0.0847 -0.0812)
OKLCHoklch(34.83% 0.117 316.2)
XYZxyz(6.1415, 3.7191, 11.9473)
Luminance0.0372 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512162 #326221
analogous
#302162 #512162 #622152
triadic
#512162 #625121 #216251
tetradic
#512162 #623021 #326221 #215262
square
#512162 #623021 #326221 #215262
split-complementary
#512162 #526221 #216230
monochromatic
#130817 #2B1234 #512162 #773090 #9D40BE

Accessibility & contrast

On white

12.04
#512162 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512162
12.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512162#FFFFFF#000000##FFFFFF
##5121621.0012.041.7412.04
#FFFFFF12.041.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0C3364
Deuteranopia (green-blind)
#213860
Tritanopia (blue-blind)
#502D3E
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #512162;
/* rgb */ color: rgb(81, 33, 98);
/* oklch */ color: oklch(34.8% 0.117 316.2);
Tailwind
colors: {
  custom: {
    50: '#84608f',
    500: '#512162',
    950: '#000000',
  },
}
SCSS
$custom: #512162;
$custom-light: #84608f;
$custom-dark: #000000;
JSON
{
  "hex": "#512162",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 98
  },
  "hsl": {
    "h": 284.308,
    "s": 49.618,
    "l": 25.686
  },
  "oklch": {
    "l": 0.34831,
    "c": 0.11731,
    "h": 316.2
  },
  "luminance": 0.03719
}

Semantic roles & 50–950 ramp

primary
#512162
secondary
#5D9649
accent
#D94F73
background
#F8F5F8
surface
#EFE9F0
border
#CAC5CB
text
#0B050C
muted
#7C797D

Preview Lab

Preview with #512162

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

Preview Lab → · Contrast checker → · Palette generator →

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