#512281#512281

#512281 is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.3% C 0.151 H 302.1°. Best body text is #FFFFFF at 11.08:1 contrast (WCAG AA passes).

Color values

HEX#512281
RGBrgb(81, 34, 129)
HSLhsl(270, 58%, 32%)
HSVhsv(270, 74%, 51%)
CMYKcmyk(37.2%, 73.6%, 0%, 49.4%)
CIE-LABlab(25.19, 40.89, -44.92)
CIE-LCHlch(25.19, 60.74, 312.32°)
OKLaboklab(37.33% 0.0802 -0.128)
OKLCHoklch(37.33% 0.151 302.1)
XYZxyz(7.9269, 4.4783, 21.2114)
Luminance0.0448 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512281 #528122
analogous
#222381 #512281 #812281
triadic
#512281 #815122 #228151
tetradic
#512281 #812223 #528122 #228181
square
#512281 #812223 #528122 #228181
split-complementary
#512281 #818122 #238122
monochromatic
#140820 #331551 #512281 #6F2FB1 #8E4DD0

Accessibility & contrast

On white

11.08
#512281 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.90
#512281 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512281
11.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512281#FFFFFF#000000##FFFFFF
##5122811.0011.081.9011.08
#FFFFFF11.081.0021.001.00
#0000001.9021.001.0021.00
##FFFFFF11.081.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #512281;
/* rgb */ color: rgb(81, 34, 129);
/* oklch */ color: oklch(37.3% 0.151 302.1);
Tailwind
colors: {
  custom: {
    50: '#8661a6',
    500: '#512281',
    950: '#000000',
  },
}
SCSS
$custom: #512281;
$custom-light: #8661a6;
$custom-dark: #000000;
JSON
{
  "hex": "#512281",
  "rgb": {
    "r": 81,
    "g": 34,
    "b": 129
  },
  "hsl": {
    "h": 269.684,
    "s": 58.282,
    "l": 31.961
  },
  "oklch": {
    "l": 0.37331,
    "c": 0.15104,
    "h": 302.1
  },
  "luminance": 0.04478
}

Semantic roles & 50–950 ramp

primary
#512281
secondary
#80B34B
accent
#E14695
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C050F
muted
#7D797F

Preview Lab

Preview with #512281

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

Preview Lab → · Contrast checker → · Palette generator →

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