#512B8D#512B8D

#512B8D is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.5% C 0.153 H 296.5°. Best body text is #FFFFFF at 10.10:1 contrast (WCAG AA passes).

Color values

HEX#512B8D
RGBrgb(81, 43, 141)
HSLhsl(263, 53%, 36%)
HSVhsv(263, 70%, 55%)
CMYKcmyk(42.6%, 69.5%, 0%, 44.7%)
CIE-LABlab(27.85, 39.44, -48.10)
CIE-LCHlch(27.85, 62.21, 309.35°)
OKLaboklab(39.53% 0.0684 -0.1374)
OKLCHoklch(39.53% 0.153 296.5)
XYZxyz(9.0637, 5.4000, 25.7589)
Luminance0.0540 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512B8D #678D2B
analogous
#2B368D #512B8D #822B8D
triadic
#512B8D #8D512B #2B8D51
tetradic
#512B8D #8D2B36 #678D2B #2B8D82
square
#512B8D #8D2B36 #678D2B #2B8D82
split-complementary
#512B8D #8D822B #368D2B
monochromatic
#1B0E2F #361D5E #512B8D #6C39BC #8D63CF

Accessibility & contrast

On white

10.10
#512B8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.08
#512B8D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512B8D
10.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512B8D#FFFFFF#000000##FFFFFF
##512B8D1.0010.102.0810.10
#FFFFFF10.101.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004290
Deuteranopia (green-blind)
#00408B
Tritanopia (blue-blind)
#424358
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #512b8d;
/* rgb */ color: rgb(81, 43, 141);
/* oklch */ color: oklch(39.5% 0.153 296.5);
Tailwind
colors: {
  custom: {
    50: '#8767af',
    500: '#512b8d',
    950: '#000000',
  },
}
SCSS
$custom: #512b8d;
$custom-light: #8767af;
$custom-dark: #000000;
JSON
{
  "hex": "#512b8d",
  "rgb": {
    "r": 81,
    "g": 43,
    "b": 141
  },
  "hsl": {
    "h": 263.265,
    "s": 53.261,
    "l": 36.078
  },
  "oklch": {
    "l": 0.39527,
    "c": 0.15347,
    "h": 296.5
  },
  "luminance": 0.054
}

Semantic roles & 50–950 ramp

primary
#512B8D
secondary
#94B65E
accent
#DD4BA4
background
#F8F6FA
surface
#F0EBF5
border
#CBC6CF
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512B8D

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

Preview Lab → · Contrast checker → · Palette generator →

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