#512D9E#512D9E

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

Color values

HEX#512D9E
RGBrgb(81, 45, 158)
HSLhsl(259, 56%, 40%)
HSVhsv(259, 72%, 62%)
CMYKcmyk(48.7%, 71.5%, 0%, 38%)
CIE-LABlab(29.65, 43.16, -55.59)
CIE-LCHlch(29.65, 70.38, 307.83°)
OKLaboklab(41.26% 0.0633 -0.1594)
OKLCHoklch(41.26% 0.172 291.7)
XYZxyz(10.5015, 6.0943, 32.9641)
Luminance0.0609 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512D9E #7A9E2D
analogous
#2D429E #512D9E #8A2D9E
triadic
#512D9E #9E512D #2D9E51
tetradic
#512D9E #9E2D42 #7A9E2D #2D9E8A
square
#512D9E #9E2D42 #7A9E2D #2D9E8A
split-complementary
#512D9E #9E8A2D #429E2D
monochromatic
#20123F #391F6E #512D9E #6B40C9 #906FD6

Accessibility & contrast

On white

9.46
#512D9E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.22
#512D9E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512D9E
9.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512D9E#FFFFFF#000000##FFFFFF
##512D9E1.009.462.229.46
#FFFFFF9.461.0021.001.00
#0000002.2221.001.0021.00
##FFFFFF9.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048A1
Deuteranopia (green-blind)
#00439C
Tritanopia (blue-blind)
#384A62
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #512d9e;
/* rgb */ color: rgb(81, 45, 158);
/* oklch */ color: oklch(41.3% 0.172 291.7);
Tailwind
colors: {
  custom: {
    50: '#8969bc',
    500: '#512d9e',
    950: '#000000',
  },
}
SCSS
$custom: #512d9e;
$custom-light: #8969bc;
$custom-dark: #000000;
JSON
{
  "hex": "#512d9e",
  "rgb": {
    "r": 81,
    "g": 45,
    "b": 158
  },
  "hsl": {
    "h": 259.115,
    "s": 55.665,
    "l": 39.804
  },
  "oklch": {
    "l": 0.41256,
    "c": 0.17151,
    "h": 291.7
  },
  "luminance": 0.06095
}

Semantic roles & 50–950 ramp

primary
#512D9E
secondary
#A3BD69
accent
#DF49AF
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #512D9E

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

Preview Lab → · Contrast checker → · Palette generator →

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