#512AA4#512AA4

#512AA4 is a dark, vivid violet. Relative luminance 0.061; OKLCH L 41.4% C 0.182 H 290.8°. Best body text is #FFFFFF at 9.47:1 contrast (WCAG AA passes).

Color values

HEX#512AA4
RGBrgb(81, 42, 164)
HSLhsl(259, 59%, 40%)
HSVhsv(259, 74%, 64%)
CMYKcmyk(50.6%, 74.4%, 0%, 35.7%)
CIE-LABlab(29.63, 46.41, -59.26)
CIE-LCHlch(29.63, 75.27, 308.06°)
OKLaboklab(41.4% 0.0647 -0.1702)
OKLCHoklch(41.4% 0.182 290.8)
XYZxyz(10.9202, 6.0852, 35.7139)
Luminance0.0609 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512AA4 #7DA42A
analogous
#2A40A4 #512AA4 #8E2AA4
triadic
#512AA4 #A4512A #2AA451
tetradic
#512AA4 #A42A40 #7DA42A #2AA48E
square
#512AA4 #A42A40 #7DA42A #2AA48E
split-complementary
#512AA4 #A48E2A #40A42A
monochromatic
#211143 #391E73 #512AA4 #6C3ECD #916EDA

Accessibility & contrast

On white

9.47
#512AA4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512AA4
9.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512AA4#FFFFFF#000000##FFFFFF
##512AA41.009.472.229.47
#FFFFFF9.471.0021.001.00
#0000002.2221.001.0021.00
##FFFFFF9.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048A8
Deuteranopia (green-blind)
#0043A2
Tritanopia (blue-blind)
#354B65
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #512aa4;
/* rgb */ color: rgb(81, 42, 164);
/* oklch */ color: oklch(41.4% 0.182 290.8);
Tailwind
colors: {
  custom: {
    50: '#8a68c0',
    500: '#512aa4',
    950: '#000000',
  },
}
SCSS
$custom: #512aa4;
$custom-light: #8a68c0;
$custom-dark: #000000;
JSON
{
  "hex": "#512aa4",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 164
  },
  "hsl": {
    "h": 259.18,
    "s": 59.223,
    "l": 40.392
  },
  "oklch": {
    "l": 0.41403,
    "c": 0.18206,
    "h": 290.8
  },
  "luminance": 0.06086
}

Semantic roles & 50–950 ramp

primary
#512AA4
secondary
#A5C169
accent
#E245B0
background
#F9F6FB
surface
#F1EBF7
border
#CBC6D0
text
#0D0612
muted
#7E7A81

Preview Lab

Preview with #512AA4

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

Preview Lab → · Contrast checker → · Palette generator →

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