#512381#512381

#512381 is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.5% C 0.150 H 301.9°. Best body text is #FFFFFF at 11.01:1 contrast (WCAG AA passes).

Color values

HEX#512381
RGBrgb(81, 35, 129)
HSLhsl(269, 57%, 32%)
HSVhsv(269, 73%, 51%)
CMYKcmyk(37.2%, 72.9%, 0%, 49.4%)
CIE-LABlab(25.37, 40.40, -44.63)
CIE-LCHlch(25.37, 60.20, 312.15°)
OKLaboklab(37.46% 0.0792 -0.1271)
OKLCHoklch(37.46% 0.15 301.9)
XYZxyz(7.9559, 4.5363, 21.2211)
Luminance0.0454 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512381 #538123
analogous
#232481 #512381 #802381
triadic
#512381 #815123 #238151
tetradic
#512381 #812324 #538123 #238180
square
#512381 #812324 #538123 #238180
split-complementary
#512381 #818023 #248123
monochromatic
#150921 #331651 #512381 #6F30B1 #8E4FCF

Accessibility & contrast

On white

11.01
#512381 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.91
#512381 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512381
11.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512381#FFFFFF#000000##FFFFFF
##5123811.0011.011.9111.01
#FFFFFF11.011.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF11.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B84
Deuteranopia (green-blind)
#003C7F
Tritanopia (blue-blind)
#47394F
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #512381;
/* rgb */ color: rgb(81, 35, 129);
/* oklch */ color: oklch(37.5% 0.150 301.9);
Tailwind
colors: {
  custom: {
    50: '#8662a6',
    500: '#512381',
    950: '#000000',
  },
}
SCSS
$custom: #512381;
$custom-light: #8662a6;
$custom-dark: #000000;
JSON
{
  "hex": "#512381",
  "rgb": {
    "r": 81,
    "g": 35,
    "b": 129
  },
  "hsl": {
    "h": 269.362,
    "s": 57.317,
    "l": 32.157
  },
  "oklch": {
    "l": 0.37457,
    "c": 0.14976,
    "h": 301.9
  },
  "luminance": 0.04536
}

Semantic roles & 50–950 ramp

primary
#512381
secondary
#81B34D
accent
#E14796
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C050F
muted
#7D7A7F

Preview Lab

Preview with #512381

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

Preview Lab → · Contrast checker → · Palette generator →

#512381 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva