#51257E#51257E

#51257E is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.5% C 0.144 H 302.6°. Best body text is #FFFFFF at 10.96:1 contrast (WCAG AA passes).

Color values

HEX#51257E
RGBrgb(81, 37, 126)
HSLhsl(270, 55%, 32%)
HSVhsv(270, 71%, 49%)
CMYKcmyk(35.7%, 70.6%, 0%, 50.6%)
CIE-LABlab(25.50, 38.59, -42.53)
CIE-LCHlch(25.50, 57.43, 312.22°)
OKLaboklab(37.47% 0.0774 -0.121)
OKLCHoklch(37.47% 0.144 302.6)
XYZxyz(7.8199, 4.5788, 20.2064)
Luminance0.0458 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51257E #527E25
analogous
#25267E #51257E #7E257E
triadic
#51257E #7E5125 #257E51
tetradic
#51257E #7E2526 #527E25 #257E7E
square
#51257E #7E2526 #527E25 #257E7E
split-complementary
#51257E #7E7E25 #267E25
monochromatic
#14091F #33174F #51257E #6F33AD #8E51CC

Accessibility & contrast

On white

10.96
#51257E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#51257E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51257E
10.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51257E#FFFFFF#000000##FFFFFF
##51257E1.0010.961.9210.96
#FFFFFF10.961.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C81
Deuteranopia (green-blind)
#003C7C
Tritanopia (blue-blind)
#48394E
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #51257e;
/* rgb */ color: rgb(81, 37, 126);
/* oklch */ color: oklch(37.5% 0.144 302.6);
Tailwind
colors: {
  custom: {
    50: '#8663a4',
    500: '#51257e',
    950: '#000000',
  },
}
SCSS
$custom: #51257e;
$custom-light: #8663a4;
$custom-dark: #000000;
JSON
{
  "hex": "#51257e",
  "rgb": {
    "r": 81,
    "g": 37,
    "b": 126
  },
  "hsl": {
    "h": 269.663,
    "s": 54.601,
    "l": 31.961
  },
  "oklch": {
    "l": 0.37474,
    "c": 0.14362,
    "h": 302.6
  },
  "luminance": 0.04579
}

Semantic roles & 50–950 ramp

primary
#51257E
secondary
#80B04F
accent
#DE4A95
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C050F
muted
#7D7A7F

Preview Lab

Preview with #51257E

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

Preview Lab → · Contrast checker → · Palette generator →

#51257E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva