#512AA5#512AA5

#512AA5 is a dark, vivid violet. Relative luminance 0.061; OKLCH L 41.5% C 0.183 H 290.6°. Best body text is #FFFFFF at 9.44:1 contrast (WCAG AA passes).

Color values

HEX#512AA5
RGBrgb(81, 42, 165)
HSLhsl(259, 59%, 41%)
HSVhsv(259, 75%, 65%)
CMYKcmyk(50.9%, 74.5%, 0%, 35.3%)
CIE-LABlab(29.72, 46.69, -59.72)
CIE-LCHlch(29.72, 75.80, 308.02°)
OKLaboklab(41.49% 0.0645 -0.1715)
OKLCHoklch(41.49% 0.183 290.6)
XYZxyz(11.0109, 6.1214, 36.1914)
Luminance0.0612 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512AA5 #7EA52A
analogous
#2A41A5 #512AA5 #8E2AA5
triadic
#512AA5 #A5512A #2AA551
tetradic
#512AA5 #A52A41 #7EA52A #2AA58E
square
#512AA5 #A52A41 #7EA52A #2AA58E
split-complementary
#512AA5 #A58E2A #41A52A
monochromatic
#211143 #391E74 #512AA5 #6C3ECE #916FDA

Accessibility & contrast

On white

9.44
#512AA5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512AA5
9.44:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512AA5#FFFFFF#000000##FFFFFF
##512AA51.009.442.229.44
#FFFFFF9.441.0021.001.00
#0000002.2221.001.0021.00
##FFFFFF9.441.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048A9
Deuteranopia (green-blind)
#0043A3
Tritanopia (blue-blind)
#344B65
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #512aa5;
/* rgb */ color: rgb(81, 42, 165);
/* oklch */ color: oklch(41.5% 0.183 290.6);
Tailwind
colors: {
  custom: {
    50: '#8a68c1',
    500: '#512aa5',
    950: '#000000',
  },
}
SCSS
$custom: #512aa5;
$custom-light: #8a68c1;
$custom-dark: #000000;
JSON
{
  "hex": "#512aa5",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 165
  },
  "hsl": {
    "h": 259.024,
    "s": 59.42,
    "l": 40.588
  },
  "oklch": {
    "l": 0.41494,
    "c": 0.18322,
    "h": 290.6
  },
  "luminance": 0.06122
}

Semantic roles & 50–950 ramp

primary
#512AA5
secondary
#A5C169
accent
#E345B1
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0612
muted
#7E7A81

Preview Lab

Preview with #512AA5

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

Preview Lab → · Contrast checker → · Palette generator →

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