#51188A#51188A

#51188A is a dark, vivid violet. Relative luminance 0.042; OKLCH L 37.0% C 0.172 H 300.4°. Best body text is #FFFFFF at 11.37:1 contrast (WCAG AA passes).

Color values

HEX#51188A
RGBrgb(81, 24, 138)
HSLhsl(270, 70%, 32%)
HSVhsv(270, 83%, 54%)
CMYKcmyk(41.3%, 82.6%, 0%, 45.9%)
CIE-LABlab(24.44, 47.57, -51.79)
CIE-LCHlch(24.44, 70.32, 312.57°)
OKLaboklab(37.05% 0.0871 -0.1481)
OKLCHoklch(37.05% 0.172 300.4)
XYZxyz(8.3063, 4.2375, 24.4201)
Luminance0.0424 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51188A #518A18
analogous
#18188A #51188A #8A188A
triadic
#51188A #8A5118 #188A51
tetradic
#51188A #8A1818 #518A18 #188A8A
square
#51188A #8A1818 #518A18 #188A8A
split-complementary
#51188A #8A8A18 #188A18
monochromatic
#140622 #320F56 #51188A #7021BE #8E3FDE

Accessibility & contrast

On white

11.37
#51188A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.85
#51188A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51188A
11.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51188A#FFFFFF#000000##FFFFFF
##51188A1.0011.371.8511.37
#FFFFFF11.371.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A8D
Deuteranopia (green-blind)
#003988
Tritanopia (blue-blind)
#443852
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #51188a;
/* rgb */ color: rgb(81, 24, 138);
/* oklch */ color: oklch(37.0% 0.172 300.4);
Tailwind
colors: {
  custom: {
    50: '#885dad',
    500: '#51188a',
    950: '#000000',
  },
}
SCSS
$custom: #51188a;
$custom-light: #885dad;
$custom-dark: #000000;
JSON
{
  "hex": "#51188a",
  "rgb": {
    "r": 81,
    "g": 24,
    "b": 138
  },
  "hsl": {
    "h": 270,
    "s": 70.37,
    "l": 31.765
  },
  "oklch": {
    "l": 0.37045,
    "c": 0.17177,
    "h": 300.4
  },
  "luminance": 0.04238
}

Semantic roles & 50–950 ramp

primary
#51188A
secondary
#7FBD40
accent
#ED3B94
background
#F8F5FA
surface
#F0E9F4
border
#CBC5CE
text
#0C0510
muted
#7D797F

Preview Lab

Preview with #51188A

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

Preview Lab → · Contrast checker → · Palette generator →

#51188A Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva