#51168D#51168D

#51168D is a dark, vivid violet. Relative luminance 0.042; OKLCH L 37.1% C 0.177 H 299.7°. Best body text is #FFFFFF at 11.36:1 contrast (WCAG AA passes).

Color values

HEX#51168D
RGBrgb(81, 22, 141)
HSLhsl(270, 73%, 32%)
HSVhsv(270, 84%, 55%)
CMYKcmyk(42.6%, 84.4%, 0%, 44.7%)
CIE-LABlab(24.47, 49.04, -53.61)
CIE-LCHlch(24.47, 72.66, 312.45°)
OKLaboklab(37.15% 0.0875 -0.1534)
OKLCHoklch(37.15% 0.177 299.7)
XYZxyz(8.4867, 4.2461, 25.5666)
Luminance0.0425 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51168D #528D16
analogous
#16178D #51168D #8D168D
triadic
#51168D #8D5116 #168D51
tetradic
#51168D #8D1617 #528D16 #168D8D
square
#51168D #8D1617 #528D16 #168D8D
split-complementary
#51168D #8D8D16 #178D16
monochromatic
#140523 #330E58 #51168D #6F1EC2 #8E3DE1

Accessibility & contrast

On white

11.36
#51168D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.85
#51168D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51168D
11.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51168D#FFFFFF#000000##FFFFFF
##51168D1.0011.361.8511.36
#FFFFFF11.361.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A90
Deuteranopia (green-blind)
#00398B
Tritanopia (blue-blind)
#423953
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #51168d;
/* rgb */ color: rgb(81, 22, 141);
/* oklch */ color: oklch(37.1% 0.177 299.7);
Tailwind
colors: {
  custom: {
    50: '#895caf',
    500: '#51168d',
    950: '#000000',
  },
}
SCSS
$custom: #51168d;
$custom-light: #895caf;
$custom-dark: #000000;
JSON
{
  "hex": "#51168d",
  "rgb": {
    "r": 81,
    "g": 22,
    "b": 141
  },
  "hsl": {
    "h": 269.748,
    "s": 73.006,
    "l": 31.961
  },
  "oklch": {
    "l": 0.3715,
    "c": 0.17662,
    "h": 299.7
  },
  "luminance": 0.04246
}

Semantic roles & 50–950 ramp

primary
#51168D
secondary
#80C13E
accent
#F03895
background
#F8F5FA
surface
#F0E9F5
border
#CBC5CF
text
#0C0410
muted
#7D797F

Preview Lab

Preview with #51168D

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

Preview Lab → · Contrast checker → · Palette generator →

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