#51217C#51217C

#51217C is a dark, vivid violet. Relative luminance 0.043; OKLCH L 36.8% C 0.147 H 304.1°. Best body text is #FFFFFF at 11.30:1 contrast (WCAG AA passes).

Color values

HEX#51217C
RGBrgb(81, 33, 124)
HSLhsl(272, 58%, 31%)
HSVhsv(272, 73%, 49%)
CMYKcmyk(34.7%, 73.4%, 0%, 51.4%)
CIE-LABlab(24.62, 40.10, -42.70)
CIE-LCHlch(24.62, 58.58, 313.20°)
OKLaboklab(36.79% 0.0822 -0.1214)
OKLCHoklch(36.79% 0.147 304.1)
XYZxyz(7.5745, 4.2923, 19.4943)
Luminance0.0429 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51217C #4C7C21
analogous
#23217C #51217C #7C2179
triadic
#51217C #7C5121 #217C51
tetradic
#51217C #7C2321 #4C7C21 #21797C
square
#51217C #7C2321 #4C7C21 #21797C
split-complementary
#51217C #797C21 #217C23
monochromatic
#12071B #31144C #51217C #712EAC #8F49CF

Accessibility & contrast

On white

11.30
#51217C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.86
#51217C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51217C
11.30:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51217C#FFFFFF#000000##FFFFFF
##51217C1.0011.301.8611.30
#FFFFFF11.301.0021.001.00
#0000001.8621.001.0021.00
##FFFFFF11.301.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00397F
Deuteranopia (green-blind)
#003A7A
Tritanopia (blue-blind)
#49364C
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #51217c;
/* rgb */ color: rgb(81, 33, 124);
/* oklch */ color: oklch(36.8% 0.147 304.1);
Tailwind
colors: {
  custom: {
    50: '#8661a3',
    500: '#51217c',
    950: '#000000',
  },
}
SCSS
$custom: #51217c;
$custom-light: #8661a3;
$custom-dark: #000000;
JSON
{
  "hex": "#51217c",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 124
  },
  "hsl": {
    "h": 271.648,
    "s": 57.962,
    "l": 30.784
  },
  "oklch": {
    "l": 0.36793,
    "c": 0.14666,
    "h": 304.1
  },
  "luminance": 0.04292
}

Semantic roles & 50–950 ramp

primary
#51217C
secondary
#7AAF4A
accent
#E14790
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C050F
muted
#7D797F

Preview Lab

Preview with #51217C

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

Preview Lab → · Contrast checker → · Palette generator →

#51217C Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva