#512E7D#512E7D

#512E7D is a dark, vivid violet. Relative luminance 0.052; OKLCH L 38.7% C 0.129 H 300.9°. Best body text is #FFFFFF at 10.31:1 contrast (WCAG AA passes).

Color values

HEX#512E7D
RGBrgb(81, 46, 125)
HSLhsl(267, 46%, 34%)
HSVhsv(267, 63%, 49%)
CMYKcmyk(35.2%, 63.2%, 0%, 51%)
CIE-LABlab(27.25, 33.34, -39.07)
CIE-LCHlch(27.25, 51.36, 310.48°)
OKLaboklab(38.71% 0.0664 -0.1108)
OKLCHoklch(38.71% 0.129 300.9)
XYZxyz(8.0711, 5.1839, 19.9734)
Luminance0.0518 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512E7D #5A7D2E
analogous
#2E327D #512E7D #782E7D
triadic
#512E7D #7D512E #2E7D51
tetradic
#512E7D #7D2E32 #5A7D2E #2E7D78
square
#512E7D #7D2E32 #5A7D2E #2E7D78
split-complementary
#512E7D #7D782E #327D2E
monochromatic
#170D24 #341E50 #512E7D #6E3EAA #8D61C5

Accessibility & contrast

On white

10.31
#512E7D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.04
#512E7D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512E7D
10.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512E7D#FFFFFF#000000##FFFFFF
##512E7D1.0010.312.0410.31
#FFFFFF10.311.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004080
Deuteranopia (green-blind)
#14407B
Tritanopia (blue-blind)
#483F51
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #512e7d;
/* rgb */ color: rgb(81, 46, 125);
/* oklch */ color: oklch(38.7% 0.129 300.9);
Tailwind
colors: {
  custom: {
    50: '#8569a3',
    500: '#512e7d',
    950: '#000000',
  },
}
SCSS
$custom: #512e7d;
$custom-light: #8569a3;
$custom-dark: #000000;
JSON
{
  "hex": "#512e7d",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 125
  },
  "hsl": {
    "h": 266.582,
    "s": 46.199,
    "l": 33.529
  },
  "oklch": {
    "l": 0.38715,
    "c": 0.12922,
    "h": 300.9
  },
  "luminance": 0.05184
}

Semantic roles & 50–950 ramp

primary
#512E7D
secondary
#88AB5B
accent
#D6529B
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0B060F
muted
#7C7A7F

Preview Lab

Preview with #512E7D

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

Preview Lab → · Contrast checker → · Palette generator →

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