#51217D#51217D

#51217D is a dark, vivid violet. Relative luminance 0.043; OKLCH L 36.9% C 0.148 H 303.7°. Best body text is #FFFFFF at 11.27:1 contrast (WCAG AA passes).

Color values

HEX#51217D
RGBrgb(81, 33, 125)
HSLhsl(271, 58%, 31%)
HSVhsv(271, 74%, 49%)
CMYKcmyk(35.2%, 73.6%, 0%, 51%)
CIE-LABlab(24.70, 40.36, -43.20)
CIE-LCHlch(24.70, 59.12, 313.05°)
OKLaboklab(36.88% 0.082 -0.1229)
OKLCHoklch(36.88% 0.148 303.7)
XYZxyz(7.6380, 4.3177, 19.8291)
Luminance0.0432 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51217D #4D7D21
analogous
#23217D #51217D #7D217B
triadic
#51217D #7D5121 #217D51
tetradic
#51217D #7D2321 #4D7D21 #217B7D
square
#51217D #7D2321 #4D7D21 #217B7D
split-complementary
#51217D #7B7D21 #217D23
monochromatic
#12071C #32144D #51217D #702EAD #8F49CF

Accessibility & contrast

On white

11.27
#51217D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #51217D
11.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51217D#FFFFFF#000000##FFFFFF
##51217D1.0011.271.8611.27
#FFFFFF11.271.0021.001.00
#0000001.8621.001.0021.00
##FFFFFF11.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A80
Deuteranopia (green-blind)
#003A7B
Tritanopia (blue-blind)
#48374C
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #51217d;
/* rgb */ color: rgb(81, 33, 125);
/* oklch */ color: oklch(36.9% 0.148 303.7);
Tailwind
colors: {
  custom: {
    50: '#8661a3',
    500: '#51217d',
    950: '#000000',
  },
}
SCSS
$custom: #51217d;
$custom-light: #8661a3;
$custom-dark: #000000;
JSON
{
  "hex": "#51217d",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 125
  },
  "hsl": {
    "h": 271.304,
    "s": 58.228,
    "l": 30.98
  },
  "oklch": {
    "l": 0.36875,
    "c": 0.14778,
    "h": 303.7
  },
  "luminance": 0.04318
}

Semantic roles & 50–950 ramp

primary
#51217D
secondary
#7BB04A
accent
#E14691
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C050F
muted
#7D797F

Preview Lab

Preview with #51217D

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

Preview Lab → · Contrast checker → · Palette generator →

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