#51218D#51218D

#51218D is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.2% C 0.166 H 298.3°. Best body text is #FFFFFF at 10.76:1 contrast (WCAG AA passes).

Color values

HEX#51218D
RGBrgb(81, 33, 141)
HSLhsl(267, 62%, 34%)
HSVhsv(267, 77%, 55%)
CMYKcmyk(42.6%, 76.6%, 0%, 44.7%)
CIE-LABlab(26.04, 44.51, -51.04)
CIE-LCHlch(26.04, 67.72, 311.09°)
OKLaboklab(38.25% 0.0785 -0.146)
OKLCHoklch(38.25% 0.166 298.3)
XYZxyz(8.7437, 4.7600, 25.6522)
Luminance0.0476 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51218D #5D8D21
analogous
#21278D #51218D #87218D
triadic
#51218D #8D5121 #218D51
tetradic
#51218D #8D2127 #5D8D21 #218D87
square
#51218D #8D2127 #5D8D21 #218D87
split-complementary
#51218D #8D8721 #278D21
monochromatic
#180A2A #35155B #51218D #6D2DBF #8D52D6

Accessibility & contrast

On white

10.76
#51218D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#51218D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51218D
10.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51218D#FFFFFF#000000##FFFFFF
##51218D1.0010.761.9510.76
#FFFFFF10.761.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E90
Deuteranopia (green-blind)
#003C8B
Tritanopia (blue-blind)
#423D55
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #51218d;
/* rgb */ color: rgb(81, 33, 141);
/* oklch */ color: oklch(38.2% 0.166 298.3);
Tailwind
colors: {
  custom: {
    50: '#8862af',
    500: '#51218d',
    950: '#000000',
  },
}
SCSS
$custom: #51218d;
$custom-light: #8862af;
$custom-dark: #000000;
JSON
{
  "hex": "#51218d",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 141
  },
  "hsl": {
    "h": 266.667,
    "s": 62.069,
    "l": 34.118
  },
  "oklch": {
    "l": 0.38245,
    "c": 0.16576,
    "h": 298.3
  },
  "luminance": 0.0476
}

Semantic roles & 50–950 ramp

primary
#51218D
secondary
#8BBA50
accent
#E5439D
background
#F8F6FA
surface
#F0EBF5
border
#CBC6CF
text
#0C0510
muted
#7D7A7F

Preview Lab

Preview with #51218D

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

Preview Lab → · Contrast checker → · Palette generator →

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