#51287F#51287F

#51287F is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.0% C 0.141 H 301.6°. Best body text is #FFFFFF at 10.72:1 contrast (WCAG AA passes).

Color values

HEX#51287F
RGBrgb(81, 40, 127)
HSLhsl(268, 52%, 33%)
HSVhsv(268, 69%, 50%)
CMYKcmyk(36.2%, 68.5%, 0%, 50.2%)
CIE-LABlab(26.15, 37.26, -42.10)
CIE-LCHlch(26.15, 56.22, 311.51°)
OKLaboklab(37.97% 0.0738 -0.1197)
OKLCHoklch(37.97% 0.141 301.6)
XYZxyz(7.9820, 4.7992, 20.5804)
Luminance0.0480 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51287F #567F28
analogous
#282A7F #51287F #7C287F
triadic
#51287F #7F5128 #287F51
tetradic
#51287F #7F282A #567F28 #287F7C
square
#51287F #7F282A #567F28 #287F7C
split-complementary
#51287F #7F7C28 #2A7F28
monochromatic
#160B22 #331950 #51287F #6F37AE #8D57CA

Accessibility & contrast

On white

10.72
#51287F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#51287F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51287F
10.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51287F#FFFFFF#000000##FFFFFF
##51287F1.0010.721.9610.72
#FFFFFF10.721.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D82
Deuteranopia (green-blind)
#003D7D
Tritanopia (blue-blind)
#473C50
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #51287f;
/* rgb */ color: rgb(81, 40, 127);
/* oklch */ color: oklch(38.0% 0.141 301.6);
Tailwind
colors: {
  custom: {
    50: '#8665a5',
    500: '#51287f',
    950: '#000000',
  },
}
SCSS
$custom: #51287f;
$custom-light: #8665a5;
$custom-dark: #000000;
JSON
{
  "hex": "#51287f",
  "rgb": {
    "r": 81,
    "g": 40,
    "b": 127
  },
  "hsl": {
    "h": 268.276,
    "s": 52.096,
    "l": 32.745
  },
  "oklch": {
    "l": 0.37968,
    "c": 0.14062,
    "h": 301.6
  },
  "luminance": 0.04799
}

Semantic roles & 50–950 ramp

primary
#51287F
secondary
#84AF54
accent
#DC4C98
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0B060F
muted
#7C7A7F

Preview Lab

Preview with #51287F

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

Preview Lab → · Contrast checker → · Palette generator →

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