#51217E#51217E

#51217E is a dark, vivid violet. Relative luminance 0.043; OKLCH L 37.0% C 0.149 H 303.3°. Best body text is #FFFFFF at 11.24:1 contrast (WCAG AA passes).

Color values

HEX#51217E
RGBrgb(81, 33, 126)
HSLhsl(271, 58%, 31%)
HSVhsv(271, 74%, 49%)
CMYKcmyk(35.7%, 73.8%, 0%, 50.6%)
CIE-LABlab(24.78, 40.61, -43.70)
CIE-LCHlch(24.78, 59.66, 312.90°)
OKLaboklab(36.96% 0.0819 -0.1244)
OKLCHoklch(36.96% 0.149 303.3)
XYZxyz(7.7022, 4.3434, 20.1672)
Luminance0.0434 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51217E #4E7E21
analogous
#22217E #51217E #7E217C
triadic
#51217E #7E5121 #217E51
tetradic
#51217E #7E2221 #4E7E21 #217C7E
square
#51217E #7E2221 #4E7E21 #217C7E
split-complementary
#51217E #7C7E21 #217E22
monochromatic
#13081D #32144E #51217E #702EAE #8F4AD0

Accessibility & contrast

On white

11.24
#51217E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#51217E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51217E
11.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51217E#FFFFFF#000000##FFFFFF
##51217E1.0011.241.8711.24
#FFFFFF11.241.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A81
Deuteranopia (green-blind)
#003B7C
Tritanopia (blue-blind)
#48374D
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #51217e;
/* rgb */ color: rgb(81, 33, 126);
/* oklch */ color: oklch(37.0% 0.149 303.3);
Tailwind
colors: {
  custom: {
    50: '#8661a4',
    500: '#51217e',
    950: '#000000',
  },
}
SCSS
$custom: #51217e;
$custom-light: #8661a4;
$custom-dark: #000000;
JSON
{
  "hex": "#51217e",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 126
  },
  "hsl": {
    "h": 270.968,
    "s": 58.491,
    "l": 31.176
  },
  "oklch": {
    "l": 0.36958,
    "c": 0.14892,
    "h": 303.3
  },
  "luminance": 0.04343
}

Semantic roles & 50–950 ramp

primary
#51217E
secondary
#7CB14A
accent
#E24691
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C050F
muted
#7D797F

Preview Lab

Preview with #51217E

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

Preview Lab → · Contrast checker → · Palette generator →

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