#512166#512166

#512166 is a dark, vivid purple. Relative luminance 0.038; OKLCH L 35.1% C 0.122 H 314.0°. Best body text is #FFFFFF at 11.94:1 contrast (WCAG AA passes).

Color values

HEX#512166
RGBrgb(81, 33, 102)
HSLhsl(282, 51%, 26%)
HSVhsv(282, 68%, 40%)
CMYKcmyk(20.6%, 67.6%, 0%, 60%)
CIE-LABlab(22.99, 34.68, -31.18)
CIE-LCHlch(22.99, 46.63, 318.04°)
OKLaboklab(35.11% 0.0846 -0.0876)
OKLCHoklch(35.11% 0.122 314)
XYZxyz(6.3351, 3.7965, 12.9669)
Luminance0.0380 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512166 #366621
analogous
#2F2166 #512166 #662159
triadic
#512166 #665121 #216651
tetradic
#512166 #662F21 #366621 #215966
square
#512166 #662F21 #366621 #215966
split-complementary
#512166 #596621 #21662F
monochromatic
#120717 #2C1238 #512166 #763094 #9A40C1

Accessibility & contrast

On white

11.94
#512166 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#512166 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512166
11.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512166#FFFFFF#000000##FFFFFF
##5121661.0011.941.7611.94
#FFFFFF11.941.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#043468
Deuteranopia (green-blind)
#1E3864
Tritanopia (blue-blind)
#4F2E40
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #512166;
/* rgb */ color: rgb(81, 33, 102);
/* oklch */ color: oklch(35.1% 0.122 314.0);
Tailwind
colors: {
  custom: {
    50: '#846092',
    500: '#512166',
    950: '#000000',
  },
}
SCSS
$custom: #512166;
$custom-light: #846092;
$custom-dark: #000000;
JSON
{
  "hex": "#512166",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 102
  },
  "hsl": {
    "h": 281.739,
    "s": 51.111,
    "l": 26.471
  },
  "oklch": {
    "l": 0.3511,
    "c": 0.12179,
    "h": 314
  },
  "luminance": 0.03796
}

Semantic roles & 50–950 ramp

primary
#512166
secondary
#629A49
accent
#DB4D78
background
#F8F5F9
surface
#EFEAF1
border
#CAC6CB
text
#0B050D
muted
#7C797E

Preview Lab

Preview with #512166

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

Preview Lab → · Contrast checker → · Palette generator →

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