#51218B#51218B

#51218B is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.1% C 0.164 H 298.9°. Best body text is #FFFFFF at 10.82:1 contrast (WCAG AA passes).

Color values

HEX#51218B
RGBrgb(81, 33, 139)
HSLhsl(267, 62%, 34%)
HSVhsv(267, 76%, 55%)
CMYKcmyk(41.7%, 76.3%, 0%, 45.5%)
CIE-LABlab(25.87, 43.98, -50.08)
CIE-LCHlch(25.87, 66.65, 311.29°)
OKLaboklab(38.07% 0.079 -0.1431)
OKLCHoklch(38.07% 0.164 298.9)
XYZxyz(8.5962, 4.7010, 24.8756)
Luminance0.0470 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51218B #5B8B21
analogous
#21268B #51218B #86218B
triadic
#51218B #8B5121 #218B51
tetradic
#51218B #8B2126 #5B8B21 #218B86
square
#51218B #8B2126 #5B8B21 #218B86
split-complementary
#51218B #8B8621 #268B21
monochromatic
#170A28 #34155A #51218B #6E2DBC #8D51D6

Accessibility & contrast

On white

10.82
#51218B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.94
#51218B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51218B
10.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51218B#FFFFFF#000000##FFFFFF
##51218B1.0010.821.9410.82
#FFFFFF10.821.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D8E
Deuteranopia (green-blind)
#003C89
Tritanopia (blue-blind)
#433C54
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #51218b;
/* rgb */ color: rgb(81, 33, 139);
/* oklch */ color: oklch(38.1% 0.164 298.9);
Tailwind
colors: {
  custom: {
    50: '#8861ae',
    500: '#51218b',
    950: '#000000',
  },
}
SCSS
$custom: #51218b;
$custom-light: #8861ae;
$custom-dark: #000000;
JSON
{
  "hex": "#51218b",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 139
  },
  "hsl": {
    "h": 267.17,
    "s": 61.628,
    "l": 33.725
  },
  "oklch": {
    "l": 0.38068,
    "c": 0.16352,
    "h": 298.9
  },
  "luminance": 0.04701
}

Semantic roles & 50–950 ramp

primary
#51218B
secondary
#89B94F
accent
#E5439C
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C0510
muted
#7D797F

Preview Lab

Preview with #51218B

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

Preview Lab → · Contrast checker → · Palette generator →

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