#512B8B#512B8B

#512B8B is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.4% C 0.151 H 297.1°. Best body text is #FFFFFF at 10.15:1 contrast (WCAG AA passes).

Color values

HEX#512B8B
RGBrgb(81, 43, 139)
HSLhsl(264, 53%, 36%)
HSVhsv(264, 69%, 55%)
CMYKcmyk(41.7%, 69.1%, 0%, 45.5%)
CIE-LABlab(27.68, 38.89, -47.12)
CIE-LCHlch(27.68, 61.10, 309.53°)
OKLaboklab(39.36% 0.0687 -0.1345)
OKLCHoklch(39.36% 0.151 297.1)
XYZxyz(8.9162, 5.3410, 24.9822)
Luminance0.0534 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512B8B #658B2B
analogous
#2B358B #512B8B #812B8B
triadic
#512B8B #8B512B #2B8B51
tetradic
#512B8B #8B2B35 #658B2B #2B8B81
square
#512B8B #8B2B35 #658B2B #2B8B81
split-complementary
#512B8B #8B812B #358B2B
monochromatic
#1B0E2E #361D5C #512B8B #6C39BA #8D62CE

Accessibility & contrast

On white

10.15
#512B8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.07
#512B8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512B8B
10.15:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512B8B#FFFFFF#000000##FFFFFF
##512B8B1.0010.152.0710.15
#FFFFFF10.151.0021.001.00
#0000002.0721.001.0021.00
##FFFFFF10.151.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00428E
Deuteranopia (green-blind)
#004089
Tritanopia (blue-blind)
#424257
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #512b8b;
/* rgb */ color: rgb(81, 43, 139);
/* oklch */ color: oklch(39.4% 0.151 297.1);
Tailwind
colors: {
  custom: {
    50: '#8767ae',
    500: '#512b8b',
    950: '#000000',
  },
}
SCSS
$custom: #512b8b;
$custom-light: #8767ae;
$custom-dark: #000000;
JSON
{
  "hex": "#512b8b",
  "rgb": {
    "r": 81,
    "g": 43,
    "b": 139
  },
  "hsl": {
    "h": 263.75,
    "s": 52.747,
    "l": 35.686
  },
  "oklch": {
    "l": 0.39362,
    "c": 0.15104,
    "h": 297.1
  },
  "luminance": 0.05341
}

Semantic roles & 50–950 ramp

primary
#512B8B
secondary
#92B55D
accent
#DC4CA3
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512B8B

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

Preview Lab → · Contrast checker → · Palette generator →

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