#51157C#51157C

#51157C is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.5% C 0.160 H 305.8°. Best body text is #FFFFFF at 12.01:1 contrast (WCAG AA passes).

Color values

HEX#51157C
RGBrgb(81, 21, 124)
HSLhsl(275, 71%, 28%)
HSVhsv(275, 83%, 49%)
CMYKcmyk(34.7%, 83.1%, 0%, 51.4%)
CIE-LABlab(22.80, 45.30, -45.66)
CIE-LCHlch(22.80, 64.32, 314.78°)
OKLaboklab(35.51% 0.0937 -0.1301)
OKLCHoklch(35.51% 0.16 305.8)
XYZxyz(7.2988, 3.7410, 19.4024)
Luminance0.0374 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51157C #407C15
analogous
#1D157C #51157C #7C1573
triadic
#51157C #7C5115 #157C51
tetradic
#51157C #7C1D15 #407C15 #15737C
square
#51157C #7C1D15 #407C15 #15737C
split-complementary
#51157C #737C15 #157C1D
monochromatic
#11041A #2F0C48 #51157C #731EB0 #9430DC

Accessibility & contrast

On white

12.01
#51157C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#51157C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51157C
12.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51157C#FFFFFF#000000##FFFFFF
##51157C1.0012.011.7512.01
#FFFFFF12.011.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF12.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00357F
Deuteranopia (green-blind)
#00377A
Tritanopia (blue-blind)
#493149
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #51157c;
/* rgb */ color: rgb(81, 21, 124);
/* oklch */ color: oklch(35.5% 0.160 305.8);
Tailwind
colors: {
  custom: {
    50: '#875ba3',
    500: '#51157c',
    950: '#000000',
  },
}
SCSS
$custom: #51157c;
$custom-light: #875ba3;
$custom-dark: #000000;
JSON
{
  "hex": "#51157c",
  "rgb": {
    "r": 81,
    "g": 21,
    "b": 124
  },
  "hsl": {
    "h": 274.951,
    "s": 71.034,
    "l": 28.431
  },
  "oklch": {
    "l": 0.35512,
    "c": 0.16032,
    "h": 305.8
  },
  "luminance": 0.03741
}

Semantic roles & 50–950 ramp

primary
#51157C
secondary
#6DB13C
accent
#EE3A85
background
#F8F5FA
surface
#F0E9F4
border
#CBC5CE
text
#0C040F
muted
#7D797F

Preview Lab

Preview with #51157C

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

Preview Lab → · Contrast checker → · Palette generator →

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