#512E8F#512E8F

#512E8F is a dark, vivid violet. Relative luminance 0.057; OKLCH L 40.1% C 0.152 H 295.3°. Best body text is #FFFFFF at 9.83:1 contrast (WCAG AA passes).

Color values

HEX#512E8F
RGBrgb(81, 46, 143)
HSLhsl(262, 51%, 37%)
HSVhsv(262, 68%, 56%)
CMYKcmyk(43.4%, 67.8%, 0%, 43.9%)
CIE-LABlab(28.61, 38.35, -48.10)
CIE-LCHlch(28.61, 61.52, 308.57°)
OKLaboklab(40.12% 0.0648 -0.1374)
OKLCHoklch(40.12% 0.152 295.3)
XYZxyz(9.3269, 5.6863, 26.5874)
Luminance0.0569 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512E8F #6C8F2E
analogous
#2E3C8F #512E8F #822E8F
triadic
#512E8F #8F512E #2E8F51
tetradic
#512E8F #8F2E3C #6C8F2E #2E8F82
square
#512E8F #8F2E3C #6C8F2E #2E8F82
split-complementary
#512E8F #8F822E #3C8F2E
monochromatic
#1D1032 #371F61 #512E8F #6B3DBD #8E69CF

Accessibility & contrast

On white

9.83
#512E8F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.14
#512E8F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512E8F
9.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512E8F#FFFFFF#000000##FFFFFF
##512E8F1.009.832.149.83
#FFFFFF9.831.0021.001.00
#0000002.1421.001.0021.00
##FFFFFF9.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004492
Deuteranopia (green-blind)
#00428D
Tritanopia (blue-blind)
#41455A
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #512e8f;
/* rgb */ color: rgb(81, 46, 143);
/* oklch */ color: oklch(40.1% 0.152 295.3);
Tailwind
colors: {
  custom: {
    50: '#8769b1',
    500: '#512e8f',
    950: '#000000',
  },
}
SCSS
$custom: #512e8f;
$custom-light: #8769b1;
$custom-dark: #000000;
JSON
{
  "hex": "#512e8f",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 143
  },
  "hsl": {
    "h": 261.649,
    "s": 51.323,
    "l": 37.059
  },
  "oklch": {
    "l": 0.40124,
    "c": 0.15191,
    "h": 295.3
  },
  "luminance": 0.05686
}

Semantic roles & 50–950 ramp

primary
#512E8F
secondary
#98B663
accent
#DB4DA8
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512E8F

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

Preview Lab → · Contrast checker → · Palette generator →

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