#51217F#51217F

#51217F is a dark, vivid violet. Relative luminance 0.044; OKLCH L 37.0% C 0.150 H 303.0°. Best body text is #FFFFFF at 11.21:1 contrast (WCAG AA passes).

Color values

HEX#51217F
RGBrgb(81, 33, 127)
HSLhsl(271, 59%, 31%)
HSVhsv(271, 74%, 50%)
CMYKcmyk(36.2%, 74%, 0%, 50.2%)
CIE-LABlab(24.86, 40.87, -44.20)
CIE-LCHlch(24.86, 60.20, 312.76°)
OKLaboklab(37.04% 0.0817 -0.1259)
OKLCHoklch(37.04% 0.15 303)
XYZxyz(7.7671, 4.3693, 20.5087)
Luminance0.0437 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51217F #4F7F21
analogous
#22217F #51217F #7F217E
triadic
#51217F #7F5121 #217F51
tetradic
#51217F #7F2221 #4F7F21 #217E7F
square
#51217F #7F2221 #4F7F21 #217E7F
split-complementary
#51217F #7E7F21 #217F22
monochromatic
#13081E #32144E #51217F #702EB0 #8F4AD0

Accessibility & contrast

On white

11.21
#51217F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #51217F
11.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51217F#FFFFFF#000000##FFFFFF
##51217F1.0011.211.8711.21
#FFFFFF11.211.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A82
Deuteranopia (green-blind)
#003B7D
Tritanopia (blue-blind)
#48384E
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #51217f;
/* rgb */ color: rgb(81, 33, 127);
/* oklch */ color: oklch(37.0% 0.150 303.0);
Tailwind
colors: {
  custom: {
    50: '#8661a5',
    500: '#51217f',
    950: '#000000',
  },
}
SCSS
$custom: #51217f;
$custom-light: #8661a5;
$custom-dark: #000000;
JSON
{
  "hex": "#51217f",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 127
  },
  "hsl": {
    "h": 270.638,
    "s": 58.75,
    "l": 31.373
  },
  "oklch": {
    "l": 0.37041,
    "c": 0.15004,
    "h": 303
  },
  "luminance": 0.04369
}

Semantic roles & 50–950 ramp

primary
#51217F
secondary
#7DB24A
accent
#E24692
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C050F
muted
#7D797F

Preview Lab

Preview with #51217F

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

Preview Lab → · Contrast checker → · Palette generator →

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