#51157F#51157F

#51157F is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.8% C 0.163 H 304.6°. Best body text is #FFFFFF at 11.91:1 contrast (WCAG AA passes).

Color values

HEX#51157F
RGBrgb(81, 21, 127)
HSLhsl(274, 72%, 29%)
HSVhsv(274, 83%, 50%)
CMYKcmyk(36.2%, 83.5%, 0%, 50.2%)
CIE-LABlab(23.06, 46.01, -47.13)
CIE-LCHlch(23.06, 65.87, 314.31°)
OKLaboklab(35.78% 0.0928 -0.1344)
OKLCHoklch(35.78% 0.163 304.6)
XYZxyz(7.4914, 3.8180, 20.4168)
Luminance0.0382 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51157F #437F15
analogous
#1C157F #51157F #7F1578
triadic
#51157F #7F5115 #157F51
tetradic
#51157F #7F1C15 #437F15 #15787F
square
#51157F #7F1C15 #437F15 #15787F
split-complementary
#51157F #787F15 #157F1C
monochromatic
#11041A #300C4A #51157F #721EB4 #9331DD

Accessibility & contrast

On white

11.91
#51157F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#51157F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51157F
11.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51157F#FFFFFF#000000##FFFFFF
##51157F1.0011.911.7611.91
#FFFFFF11.911.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003682
Deuteranopia (green-blind)
#00377D
Tritanopia (blue-blind)
#48324B
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #51157f;
/* rgb */ color: rgb(81, 21, 127);
/* oklch */ color: oklch(35.8% 0.163 304.6);
Tailwind
colors: {
  custom: {
    50: '#875ba5',
    500: '#51157f',
    950: '#000000',
  },
}
SCSS
$custom: #51157f;
$custom-light: #875ba5;
$custom-dark: #000000;
JSON
{
  "hex": "#51157f",
  "rgb": {
    "r": 81,
    "g": 21,
    "b": 127
  },
  "hsl": {
    "h": 273.962,
    "s": 71.622,
    "l": 29.02
  },
  "oklch": {
    "l": 0.35779,
    "c": 0.16333,
    "h": 304.6
  },
  "luminance": 0.03818
}

Semantic roles & 50–950 ramp

primary
#51157F
secondary
#70B43C
accent
#EE3988
background
#F8F5FA
surface
#F0E9F4
border
#CBC5CE
text
#0C040F
muted
#7D797F

Preview Lab

Preview with #51157F

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

Preview Lab → · Contrast checker → · Palette generator →

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