#512782#512782

#512782 is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.1% C 0.146 H 300.8°. Best body text is #FFFFFF at 10.70:1 contrast (WCAG AA passes).

Color values

HEX#512782
RGBrgb(81, 39, 130)
HSLhsl(268, 54%, 33%)
HSVhsv(268, 70%, 51%)
CMYKcmyk(37.7%, 70%, 0%, 49%)
CIE-LABlab(26.19, 38.59, -43.92)
CIE-LCHlch(26.19, 58.47, 311.30°)
OKLaboklab(38.07% 0.0745 -0.1251)
OKLCHoklch(38.07% 0.146 300.8)
XYZxyz(8.1471, 4.8120, 21.6144)
Luminance0.0481 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512782 #588227
analogous
#272B82 #512782 #7E2782
triadic
#512782 #825127 #278251
tetradic
#512782 #82272B #588227 #27827E
square
#512782 #82272B #588227 #27827E
split-complementary
#512782 #827E27 #2B8227
monochromatic
#160B24 #341953 #512782 #6E35B1 #8D57CD

Accessibility & contrast

On white

10.70
#512782 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#512782 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512782
10.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512782#FFFFFF#000000##FFFFFF
##5127821.0010.701.9610.70
#FFFFFF10.701.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E85
Deuteranopia (green-blind)
#003D80
Tritanopia (blue-blind)
#463C51
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #512782;
/* rgb */ color: rgb(81, 39, 130);
/* oklch */ color: oklch(38.1% 0.146 300.8);
Tailwind
colors: {
  custom: {
    50: '#8664a7',
    500: '#512782',
    950: '#000000',
  },
}
SCSS
$custom: #512782;
$custom-light: #8664a7;
$custom-dark: #000000;
JSON
{
  "hex": "#512782",
  "rgb": {
    "r": 81,
    "g": 39,
    "b": 130
  },
  "hsl": {
    "h": 267.692,
    "s": 53.846,
    "l": 33.137
  },
  "oklch": {
    "l": 0.38068,
    "c": 0.14561,
    "h": 300.8
  },
  "luminance": 0.04812
}

Semantic roles & 50–950 ramp

primary
#512782
secondary
#86B153
accent
#DD4B9A
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C060F
muted
#7D7A7F

Preview Lab

Preview with #512782

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

Preview Lab → · Contrast checker → · Palette generator →

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