#512B8A#512B8A

#512B8A is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.3% C 0.150 H 297.4°. Best body text is #FFFFFF at 10.18:1 contrast (WCAG AA passes).

Color values

HEX#512B8A
RGBrgb(81, 43, 138)
HSLhsl(264, 52%, 35%)
HSVhsv(264, 69%, 54%)
CMYKcmyk(41.3%, 68.8%, 0%, 45.9%)
CIE-LABlab(27.61, 38.61, -46.63)
CIE-LCHlch(27.61, 60.54, 309.63°)
OKLaboklab(39.28% 0.0689 -0.133)
OKLCHoklch(39.28% 0.15 297.4)
XYZxyz(8.8435, 5.3119, 24.5992)
Luminance0.0531 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512B8A #648A2B
analogous
#2B348A #512B8A #802B8A
triadic
#512B8A #8A512B #2B8A51
tetradic
#512B8A #8A2B34 #648A2B #2B8A80
square
#512B8A #8A2B34 #648A2B #2B8A80
split-complementary
#512B8A #8A802B #348A2B
monochromatic
#1A0E2D #361C5B #512B8A #6C3AB9 #8D61CE

Accessibility & contrast

On white

10.18
#512B8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.06
#512B8A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512B8A
10.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512B8A#FFFFFF#000000##FFFFFF
##512B8A1.0010.182.0610.18
#FFFFFF10.181.0021.001.00
#0000002.0621.001.0021.00
##FFFFFF10.181.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00418D
Deuteranopia (green-blind)
#004088
Tritanopia (blue-blind)
#434157
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #512b8a;
/* rgb */ color: rgb(81, 43, 138);
/* oklch */ color: oklch(39.3% 0.150 297.4);
Tailwind
colors: {
  custom: {
    50: '#8767ad',
    500: '#512b8a',
    950: '#000000',
  },
}
SCSS
$custom: #512b8a;
$custom-light: #8767ad;
$custom-dark: #000000;
JSON
{
  "hex": "#512b8a",
  "rgb": {
    "r": 81,
    "g": 43,
    "b": 138
  },
  "hsl": {
    "h": 264,
    "s": 52.486,
    "l": 35.49
  },
  "oklch": {
    "l": 0.3928,
    "c": 0.14981,
    "h": 297.4
  },
  "luminance": 0.05312
}

Semantic roles & 50–950 ramp

primary
#512B8A
secondary
#91B45D
accent
#DC4CA2
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512B8A

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

Preview Lab → · Contrast checker → · Palette generator →

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