#512A99#512A99

#512A99 is a dark, vivid violet. Relative luminance 0.057; OKLCH L 40.4% C 0.169 H 293.4°. Best body text is #FFFFFF at 9.81:1 contrast (WCAG AA passes).

Color values

HEX#512A99
RGBrgb(81, 42, 153)
HSLhsl(261, 57%, 38%)
HSVhsv(261, 73%, 60%)
CMYKcmyk(47.1%, 72.5%, 0%, 40%)
CIE-LABlab(28.66, 43.32, -54.16)
CIE-LCHlch(28.66, 69.36, 308.65°)
OKLaboklab(40.42% 0.0672 -0.1552)
OKLCHoklch(40.42% 0.169 293.4)
XYZxyz(9.9695, 5.7049, 30.7067)
Luminance0.0570 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512A99 #72992A
analogous
#2A3A99 #512A99 #882A99
triadic
#512A99 #99512A #2A9951
tetradic
#512A99 #992A3A #72992A #2A9988
square
#512A99 #992A3A #72992A #2A9988
split-complementary
#512A99 #99882A #3A992A
monochromatic
#1E1039 #381D69 #512A99 #6B38C8 #8E68D6

Accessibility & contrast

On white

9.81
#512A99 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512A99
9.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512A99#FFFFFF#000000##FFFFFF
##512A991.009.812.149.81
#FFFFFF9.811.0021.001.00
#0000002.1421.001.0021.00
##FFFFFF9.811.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #512a99;
/* rgb */ color: rgb(81, 42, 153);
/* oklch */ color: oklch(40.4% 0.169 293.4);
Tailwind
colors: {
  custom: {
    50: '#8967b8',
    500: '#512a99',
    950: '#000000',
  },
}
SCSS
$custom: #512a99;
$custom-light: #8967b8;
$custom-dark: #000000;
JSON
{
  "hex": "#512a99",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 153
  },
  "hsl": {
    "h": 261.081,
    "s": 56.923,
    "l": 38.235
  },
  "oklch": {
    "l": 0.40417,
    "c": 0.16913,
    "h": 293.4
  },
  "luminance": 0.05705
}

Semantic roles & 50–950 ramp

primary
#512A99
secondary
#9DBC63
accent
#E048AB
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512A99

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

Preview Lab → · Contrast checker → · Palette generator →

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