#512287#512287

#512287 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.8% C 0.158 H 300.0°. Best body text is #FFFFFF at 10.89:1 contrast (WCAG AA passes).

Color values

HEX#512287
RGBrgb(81, 34, 135)
HSLhsl(268, 60%, 33%)
HSVhsv(268, 75%, 53%)
CMYKcmyk(40%, 74.8%, 0%, 47.1%)
CIE-LABlab(25.69, 42.46, -47.87)
CIE-LCHlch(25.69, 63.99, 311.57°)
OKLaboklab(37.84% 0.079 -0.1367)
OKLCHoklch(37.84% 0.158 300)
XYZxyz(8.3375, 4.6426, 23.3738)
Luminance0.0464 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512287 #588722
analogous
#222587 #512287 #832287
triadic
#512287 #875122 #228751
tetradic
#512287 #872225 #588722 #228783
square
#512287 #872225 #588722 #228783
split-complementary
#512287 #878322 #258722
monochromatic
#160925 #341656 #512287 #6E2EB8 #8D50D3

Accessibility & contrast

On white

10.89
#512287 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512287
10.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512287#FFFFFF#000000##FFFFFF
##5122871.0010.891.9310.89
#FFFFFF10.891.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.891.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #512287;
/* rgb */ color: rgb(81, 34, 135);
/* oklch */ color: oklch(37.8% 0.158 300.0);
Tailwind
colors: {
  custom: {
    50: '#8762ab',
    500: '#512287',
    950: '#000000',
  },
}
SCSS
$custom: #512287;
$custom-light: #8762ab;
$custom-dark: #000000;
JSON
{
  "hex": "#512287",
  "rgb": {
    "r": 81,
    "g": 34,
    "b": 135
  },
  "hsl": {
    "h": 267.921,
    "s": 59.763,
    "l": 33.137
  },
  "oklch": {
    "l": 0.37839,
    "c": 0.15785,
    "h": 300
  },
  "luminance": 0.04643
}

Semantic roles & 50–950 ramp

primary
#512287
secondary
#86B74E
accent
#E34599
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0510
muted
#7D7A7F

Preview Lab

Preview with #512287

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

Preview Lab → · Contrast checker → · Palette generator →

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