#512D9F#512D9F

#512D9F is a dark, vivid violet. Relative luminance 0.061; OKLCH L 41.3% C 0.173 H 291.4°. Best body text is #FFFFFF at 9.43:1 contrast (WCAG AA passes).

Color values

HEX#512D9F
RGBrgb(81, 45, 159)
HSLhsl(259, 56%, 40%)
HSVhsv(259, 72%, 62%)
CMYKcmyk(49.1%, 71.7%, 0%, 37.6%)
CIE-LABlab(29.74, 43.45, -56.06)
CIE-LCHlch(29.74, 70.92, 307.78°)
OKLaboklab(41.34% 0.0631 -0.1608)
OKLCHoklch(41.34% 0.173 291.4)
XYZxyz(10.5880, 6.1289, 33.4193)
Luminance0.0613 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512D9F #7B9F2D
analogous
#2D429F #512D9F #8A2D9F
triadic
#512D9F #9F512D #2D9F51
tetradic
#512D9F #9F2D42 #7B9F2D #2D9F8A
square
#512D9F #9F2D42 #7B9F2D #2D9F8A
split-complementary
#512D9F #9F8A2D #429F2D
monochromatic
#201240 #39206F #512D9F #6B40C9 #9070D6

Accessibility & contrast

On white

9.43
#512D9F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.23
#512D9F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512D9F
9.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512D9F#FFFFFF#000000##FFFFFF
##512D9F1.009.432.239.43
#FFFFFF9.431.0021.001.00
#0000002.2321.001.0021.00
##FFFFFF9.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048A2
Deuteranopia (green-blind)
#00449D
Tritanopia (blue-blind)
#384A63
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #512d9f;
/* rgb */ color: rgb(81, 45, 159);
/* oklch */ color: oklch(41.3% 0.173 291.4);
Tailwind
colors: {
  custom: {
    50: '#8969bc',
    500: '#512d9f',
    950: '#000000',
  },
}
SCSS
$custom: #512d9f;
$custom-light: #8969bc;
$custom-dark: #000000;
JSON
{
  "hex": "#512d9f",
  "rgb": {
    "r": 81,
    "g": 45,
    "b": 159
  },
  "hsl": {
    "h": 258.947,
    "s": 55.882,
    "l": 40
  },
  "oklch": {
    "l": 0.41344,
    "c": 0.17271,
    "h": 291.4
  },
  "luminance": 0.06129
}

Semantic roles & 50–950 ramp

primary
#512D9F
secondary
#A3BE6A
accent
#DF49B0
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #512D9F

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

Preview Lab → · Contrast checker → · Palette generator →

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