#512C8D#512C8D

#512C8D is a dark, vivid violet. Relative luminance 0.055; OKLCH L 39.7% C 0.152 H 296.3°. Best body text is #FFFFFF at 10.02:1 contrast (WCAG AA passes).

Color values

HEX#512C8D
RGBrgb(81, 44, 141)
HSLhsl(263, 52%, 36%)
HSVhsv(263, 69%, 55%)
CMYKcmyk(42.6%, 68.8%, 0%, 44.7%)
CIE-LABlab(28.04, 38.90, -47.78)
CIE-LCHlch(28.04, 61.61, 309.15°)
OKLaboklab(39.67% 0.0673 -0.1364)
OKLCHoklch(39.67% 0.152 296.3)
XYZxyz(9.1005, 5.4736, 25.7712)
Luminance0.0547 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512C8D #688D2C
analogous
#2C388D #512C8D #822C8D
triadic
#512C8D #8D512C #2C8D51
tetradic
#512C8D #8D2C38 #688D2C #2C8D82
square
#512C8D #8D2C38 #688D2C #2C8D82
split-complementary
#512C8D #8D822C #388D2C
monochromatic
#1B0F30 #361D5E #512C8D #6C3BBC #8D65CF

Accessibility & contrast

On white

10.02
#512C8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#512C8D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512C8D
10.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512C8D#FFFFFF#000000##FFFFFF
##512C8D1.0010.022.0910.02
#FFFFFF10.021.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004390
Deuteranopia (green-blind)
#00418B
Tritanopia (blue-blind)
#424359
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #512c8d;
/* rgb */ color: rgb(81, 44, 141);
/* oklch */ color: oklch(39.7% 0.152 296.3);
Tailwind
colors: {
  custom: {
    50: '#8768af',
    500: '#512c8d',
    950: '#000000',
  },
}
SCSS
$custom: #512c8d;
$custom-light: #8768af;
$custom-dark: #000000;
JSON
{
  "hex": "#512c8d",
  "rgb": {
    "r": 81,
    "g": 44,
    "b": 141
  },
  "hsl": {
    "h": 262.887,
    "s": 52.432,
    "l": 36.275
  },
  "oklch": {
    "l": 0.39669,
    "c": 0.15214,
    "h": 296.3
  },
  "luminance": 0.05474
}

Semantic roles & 50–950 ramp

primary
#512C8D
secondary
#95B560
accent
#DC4CA5
background
#F8F6FA
surface
#F0EBF5
border
#CBC6CF
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512C8D

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

Preview Lab → · Contrast checker → · Palette generator →

#512C8D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva