#512386#512386

#512386 is a dark, vivid violet. Relative luminance 0.047; OKLCH L 37.9% C 0.155 H 300.2°. Best body text is #FFFFFF at 10.85:1 contrast (WCAG AA passes).

Color values

HEX#512386
RGBrgb(81, 35, 134)
HSLhsl(268, 59%, 33%)
HSVhsv(268, 74%, 53%)
CMYKcmyk(39.6%, 73.9%, 0%, 47.5%)
CIE-LABlab(25.78, 41.71, -47.10)
CIE-LCHlch(25.78, 62.91, 311.52°)
OKLaboklab(37.88% 0.0782 -0.1344)
OKLCHoklch(37.88% 0.155 300.2)
XYZxyz(8.2964, 4.6725, 23.0144)
Luminance0.0467 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512386 #588623
analogous
#232686 #512386 #822386
triadic
#512386 #865123 #238651
tetradic
#512386 #862326 #588623 #238682
square
#512386 #862326 #588623 #238682
split-complementary
#512386 #868223 #268623
monochromatic
#160A25 #341655 #512386 #6E30B7 #8D52D2

Accessibility & contrast

On white

10.85
#512386 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#512386 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512386
10.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512386#FFFFFF#000000##FFFFFF
##5123861.0010.851.9310.85
#FFFFFF10.851.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D89
Deuteranopia (green-blind)
#003C84
Tritanopia (blue-blind)
#453B52
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #512386;
/* rgb */ color: rgb(81, 35, 134);
/* oklch */ color: oklch(37.9% 0.155 300.2);
Tailwind
colors: {
  custom: {
    50: '#8762aa',
    500: '#512386',
    950: '#000000',
  },
}
SCSS
$custom: #512386;
$custom-light: #8762aa;
$custom-dark: #000000;
JSON
{
  "hex": "#512386",
  "rgb": {
    "r": 81,
    "g": 35,
    "b": 134
  },
  "hsl": {
    "h": 267.879,
    "s": 58.58,
    "l": 33.137
  },
  "oklch": {
    "l": 0.37876,
    "c": 0.15549,
    "h": 300.2
  },
  "luminance": 0.04673
}

Semantic roles & 50–950 ramp

primary
#512386
secondary
#86B54F
accent
#E24699
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0510
muted
#7D7A7F

Preview Lab

Preview with #512386

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

Preview Lab → · Contrast checker → · Palette generator →

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