#51217B#51217B

#51217B is a dark, vivid violet. Relative luminance 0.043; OKLCH L 36.7% C 0.146 H 304.5°. Best body text is #FFFFFF at 11.33:1 contrast (WCAG AA passes).

Color values

HEX#51217B
RGBrgb(81, 33, 123)
HSLhsl(272, 58%, 31%)
HSVhsv(272, 73%, 48%)
CMYKcmyk(34.1%, 73.2%, 0%, 51.8%)
CIE-LABlab(24.54, 39.85, -42.19)
CIE-LCHlch(24.54, 58.03, 313.36°)
OKLaboklab(36.71% 0.0824 -0.12)
OKLCHoklch(36.71% 0.146 304.5)
XYZxyz(7.5115, 4.2671, 19.1630)
Luminance0.0427 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51217B #4B7B21
analogous
#24217B #51217B #7B2178
triadic
#51217B #7B5121 #217B51
tetradic
#51217B #7B2421 #4B7B21 #21787B
square
#51217B #7B2421 #4B7B21 #21787B
split-complementary
#51217B #787B21 #217B24
monochromatic
#11071A #31144B #51217B #712EAB #9048CE

Accessibility & contrast

On white

11.33
#51217B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.85
#51217B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51217B
11.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51217B#FFFFFF#000000##FFFFFF
##51217B1.0011.331.8511.33
#FFFFFF11.331.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.331.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00397E
Deuteranopia (green-blind)
#003A79
Tritanopia (blue-blind)
#49364B
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #51217b;
/* rgb */ color: rgb(81, 33, 123);
/* oklch */ color: oklch(36.7% 0.146 304.5);
Tailwind
colors: {
  custom: {
    50: '#8661a2',
    500: '#51217b',
    950: '#000000',
  },
}
SCSS
$custom: #51217b;
$custom-light: #8661a2;
$custom-dark: #000000;
JSON
{
  "hex": "#51217b",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 123
  },
  "hsl": {
    "h": 272,
    "s": 57.692,
    "l": 30.588
  },
  "oklch": {
    "l": 0.36712,
    "c": 0.14553,
    "h": 304.5
  },
  "luminance": 0.04267
}

Semantic roles & 50–950 ramp

primary
#51217B
secondary
#79AE4A
accent
#E1478F
background
#F8F5FA
surface
#F0EAF3
border
#CBC6CD
text
#0C050F
muted
#7D797F

Preview Lab

Preview with #51217B

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

Preview Lab → · Contrast checker → · Palette generator →

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