#512387#512387

#512387 is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.0% C 0.157 H 299.9°. Best body text is #FFFFFF at 10.82:1 contrast (WCAG AA passes).

Color values

HEX#512387
RGBrgb(81, 35, 135)
HSLhsl(268, 59%, 33%)
HSVhsv(268, 74%, 53%)
CMYKcmyk(40%, 74.1%, 0%, 47.1%)
CIE-LABlab(25.86, 41.97, -47.59)
CIE-LCHlch(25.86, 63.45, 311.41°)
OKLaboklab(37.96% 0.078 -0.1358)
OKLCHoklch(37.96% 0.157 299.9)
XYZxyz(8.3665, 4.7006, 23.3835)
Luminance0.0470 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512387 #598723
analogous
#232787 #512387 #832387
triadic
#512387 #875123 #238751
tetradic
#512387 #872327 #598723 #238783
square
#512387 #872327 #598723 #238783
split-complementary
#512387 #878323 #278723
monochromatic
#170A26 #341656 #512387 #6E30B8 #8D52D2

Accessibility & contrast

On white

10.82
#512387 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.94
#512387 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512387
10.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512387#FFFFFF#000000##FFFFFF
##5123871.0010.821.9410.82
#FFFFFF10.821.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D8A
Deuteranopia (green-blind)
#003C85
Tritanopia (blue-blind)
#453C53
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #512387;
/* rgb */ color: rgb(81, 35, 135);
/* oklch */ color: oklch(38.0% 0.157 299.9);
Tailwind
colors: {
  custom: {
    50: '#8762ab',
    500: '#512387',
    950: '#000000',
  },
}
SCSS
$custom: #512387;
$custom-light: #8762ab;
$custom-dark: #000000;
JSON
{
  "hex": "#512387",
  "rgb": {
    "r": 81,
    "g": 35,
    "b": 135
  },
  "hsl": {
    "h": 267.6,
    "s": 58.824,
    "l": 33.333
  },
  "oklch": {
    "l": 0.37962,
    "c": 0.15663,
    "h": 299.9
  },
  "luminance": 0.04701
}

Semantic roles & 50–950 ramp

primary
#512387
secondary
#87B650
accent
#E2469A
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0510
muted
#7D7A7F

Preview Lab

Preview with #512387

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

Preview Lab → · Contrast checker → · Palette generator →

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