#51168B#51168B

#51168B is a dark, vivid violet. Relative luminance 0.042; OKLCH L 37.0% C 0.175 H 300.3°. Best body text is #FFFFFF at 11.43:1 contrast (WCAG AA passes).

Color values

HEX#51168B
RGBrgb(81, 22, 139)
HSLhsl(270, 73%, 32%)
HSVhsv(270, 84%, 55%)
CMYKcmyk(41.7%, 84.2%, 0%, 45.5%)
CIE-LABlab(24.28, 48.55, -52.67)
CIE-LCHlch(24.28, 71.64, 312.67°)
OKLaboklab(36.96% 0.0882 -0.1507)
OKLCHoklch(36.96% 0.175 300.3)
XYZxyz(8.3393, 4.1871, 24.7899)
Luminance0.0419 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51168B #508B16
analogous
#16168B #51168B #8B168B
triadic
#51168B #8B5116 #168B51
tetradic
#51168B #8B1616 #508B16 #168B8B
square
#51168B #8B1616 #508B16 #168B8B
split-complementary
#51168B #8B8B16 #168B16
monochromatic
#130521 #320E56 #51168B #701EC0 #8E3BE0

Accessibility & contrast

On white

11.43
#51168B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.84
#51168B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51168B
11.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51168B#FFFFFF#000000##FFFFFF
##51168B1.0011.431.8411.43
#FFFFFF11.431.0021.001.00
#0000001.8421.001.0021.00
##FFFFFF11.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00398E
Deuteranopia (green-blind)
#003989
Tritanopia (blue-blind)
#433852
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #51168b;
/* rgb */ color: rgb(81, 22, 139);
/* oklch */ color: oklch(37.0% 0.175 300.3);
Tailwind
colors: {
  custom: {
    50: '#885cae',
    500: '#51168b',
    950: '#000000',
  },
}
SCSS
$custom: #51168b;
$custom-light: #885cae;
$custom-dark: #000000;
JSON
{
  "hex": "#51168b",
  "rgb": {
    "r": 81,
    "g": 22,
    "b": 139
  },
  "hsl": {
    "h": 270.256,
    "s": 72.671,
    "l": 31.569
  },
  "oklch": {
    "l": 0.36962,
    "c": 0.17458,
    "h": 300.3
  },
  "luminance": 0.04187
}

Semantic roles & 50–950 ramp

primary
#51168B
secondary
#7EBF3E
accent
#EF3893
background
#F8F5FA
surface
#F0E9F4
border
#CBC5CE
text
#0C0410
muted
#7D797F

Preview Lab

Preview with #51168B

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

Preview Lab → · Contrast checker → · Palette generator →

#51168B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva