#512B99#512B99

#512B99 is a dark, vivid violet. Relative luminance 0.058; OKLCH L 40.5% C 0.168 H 293.2°. Best body text is #FFFFFF at 9.74:1 contrast (WCAG AA passes).

Color values

HEX#512B99
RGBrgb(81, 43, 153)
HSLhsl(261, 56%, 38%)
HSVhsv(261, 72%, 60%)
CMYKcmyk(47.1%, 71.9%, 0%, 40%)
CIE-LABlab(28.84, 42.80, -53.86)
CIE-LCHlch(28.84, 68.79, 308.47°)
OKLaboklab(40.55% 0.0663 -0.1543)
OKLCHoklch(40.55% 0.168 293.2)
XYZxyz(10.0054, 5.7767, 30.7187)
Luminance0.0578 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512B99 #73992B
analogous
#2B3C99 #512B99 #882B99
triadic
#512B99 #99512B #2B9951
tetradic
#512B99 #992B3C #73992B #2B9988
square
#512B99 #992B3C #73992B #2B9988
split-complementary
#512B99 #99882B #3C992B
monochromatic
#1E1039 #381E69 #512B99 #6B3AC8 #8F69D5

Accessibility & contrast

On white

9.74
#512B99 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.16
#512B99 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512B99
9.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512B99#FFFFFF#000000##FFFFFF
##512B991.009.742.169.74
#FFFFFF9.741.0021.001.00
#0000002.1621.001.0021.00
##FFFFFF9.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00459C
Deuteranopia (green-blind)
#004297
Tritanopia (blue-blind)
#3C475F
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #512b99;
/* rgb */ color: rgb(81, 43, 153);
/* oklch */ color: oklch(40.5% 0.168 293.2);
Tailwind
colors: {
  custom: {
    50: '#8968b8',
    500: '#512b99',
    950: '#000000',
  },
}
SCSS
$custom: #512b99;
$custom-light: #8968b8;
$custom-dark: #000000;
JSON
{
  "hex": "#512b99",
  "rgb": {
    "r": 81,
    "g": 43,
    "b": 153
  },
  "hsl": {
    "h": 260.727,
    "s": 56.122,
    "l": 38.431
  },
  "oklch": {
    "l": 0.40549,
    "c": 0.16793,
    "h": 293.2
  },
  "luminance": 0.05777
}

Semantic roles & 50–950 ramp

primary
#512B99
secondary
#9DBC64
accent
#DF48AB
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512B99

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

Preview Lab → · Contrast checker → · Palette generator →

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