#51158D#51158D

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

Color values

HEX#51158D
RGBrgb(81, 21, 141)
HSLhsl(270, 74%, 32%)
HSVhsv(270, 85%, 55%)
CMYKcmyk(42.6%, 85.1%, 0%, 44.7%)
CIE-LABlab(24.35, 49.39, -53.81)
CIE-LCHlch(24.35, 73.04, 312.55°)
OKLaboklab(37.07% 0.0882 -0.154)
OKLCHoklch(37.07% 0.177 299.8)
XYZxyz(8.4680, 4.2086, 25.5603)
Luminance0.0421 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51158D #518D15
analogous
#15158D #51158D #8D158D
triadic
#51158D #8D5115 #158D51
tetradic
#51158D #8D1515 #518D15 #158D8D
square
#51158D #8D1515 #518D15 #158D8D
split-complementary
#51158D #8D8D15 #158D15
monochromatic
#140522 #320D58 #51158D #701DC2 #8E3BE2

Accessibility & contrast

On white

11.40
#51158D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.84
#51158D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51158D
11.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51158D#FFFFFF#000000##FFFFFF
##51158D1.0011.401.8411.40
#FFFFFF11.401.0021.001.00
#0000001.8421.001.0021.00
##FFFFFF11.401.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #51158d;
/* rgb */ color: rgb(81, 21, 141);
/* oklch */ color: oklch(37.1% 0.177 299.8);
Tailwind
colors: {
  custom: {
    50: '#895caf',
    500: '#51158d',
    950: '#000000',
  },
}
SCSS
$custom: #51158d;
$custom-light: #895caf;
$custom-dark: #000000;
JSON
{
  "hex": "#51158d",
  "rgb": {
    "r": 81,
    "g": 21,
    "b": 141
  },
  "hsl": {
    "h": 270,
    "s": 74.074,
    "l": 31.765
  },
  "oklch": {
    "l": 0.37067,
    "c": 0.17746,
    "h": 299.8
  },
  "luminance": 0.04209
}

Semantic roles & 50–950 ramp

primary
#51158D
secondary
#7FC13D
accent
#F13794
background
#F8F5FA
surface
#F0E9F5
border
#CBC5CF
text
#0C0411
muted
#7D7980

Preview Lab

Preview with #51158D

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

Preview Lab → · Contrast checker → · Palette generator →

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