#512181#512181

#512181 is a dark, vivid violet. Relative luminance 0.044; OKLCH L 37.2% C 0.152 H 302.3°. Best body text is #FFFFFF at 11.14:1 contrast (WCAG AA passes).

Color values

HEX#512181
RGBrgb(81, 33, 129)
HSLhsl(270, 59%, 32%)
HSVhsv(270, 74%, 51%)
CMYKcmyk(37.2%, 74.4%, 0%, 49.4%)
CIE-LABlab(25.02, 41.38, -45.20)
CIE-LCHlch(25.02, 61.28, 312.48°)
OKLaboklab(37.21% 0.0813 -0.1288)
OKLCHoklch(37.21% 0.152 302.3)
XYZxyz(7.8987, 4.4220, 21.2020)
Luminance0.0442 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512181 #518121
analogous
#212181 #512181 #812181
triadic
#512181 #815121 #218151
tetradic
#512181 #812121 #518121 #218181
square
#512181 #812121 #518121 #218181
split-complementary
#512181 #818121 #218121
monochromatic
#140820 #321550 #512181 #702DB2 #8E4BD1

Accessibility & contrast

On white

11.14
#512181 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.88
#512181 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512181
11.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512181#FFFFFF#000000##FFFFFF
##5121811.0011.141.8811.14
#FFFFFF11.141.0021.001.00
#0000001.8821.001.0021.00
##FFFFFF11.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B84
Deuteranopia (green-blind)
#003B7F
Tritanopia (blue-blind)
#47384F
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #512181;
/* rgb */ color: rgb(81, 33, 129);
/* oklch */ color: oklch(37.2% 0.152 302.3);
Tailwind
colors: {
  custom: {
    50: '#8761a6',
    500: '#512181',
    950: '#000000',
  },
}
SCSS
$custom: #512181;
$custom-light: #8761a6;
$custom-dark: #000000;
JSON
{
  "hex": "#512181",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 129
  },
  "hsl": {
    "h": 270,
    "s": 59.259,
    "l": 31.765
  },
  "oklch": {
    "l": 0.37208,
    "c": 0.1523,
    "h": 302.3
  },
  "luminance": 0.04422
}

Semantic roles & 50–950 ramp

primary
#512181
secondary
#7FB44A
accent
#E24594
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C050F
muted
#7D797F

Preview Lab

Preview with #512181

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

Preview Lab → · Contrast checker → · Palette generator →

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