#512AA2#512AA2

#512AA2 is a dark, vivid violet. Relative luminance 0.060; OKLCH L 41.2% C 0.180 H 291.3°. Best body text is #FFFFFF at 9.53:1 contrast (WCAG AA passes).

Color values

HEX#512AA2
RGBrgb(81, 42, 162)
HSLhsl(260, 59%, 40%)
HSVhsv(260, 74%, 64%)
CMYKcmyk(50%, 74.1%, 0%, 36.5%)
CIE-LABlab(29.45, 45.84, -58.35)
CIE-LCHlch(29.45, 74.20, 308.16°)
OKLaboklab(41.22% 0.0652 -0.1675)
OKLCHoklch(41.22% 0.18 291.3)
XYZxyz(10.7410, 6.0135, 34.7702)
Luminance0.0601 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512AA2 #7BA22A
analogous
#2A3FA2 #512AA2 #8D2AA2
triadic
#512AA2 #A2512A #2AA251
tetradic
#512AA2 #A22A3F #7BA22A #2AA28D
square
#512AA2 #A22A3F #7BA22A #2AA28D
split-complementary
#512AA2 #A28D2A #3FA22A
monochromatic
#201141 #391D71 #512AA2 #6B3DCD #906DD9

Accessibility & contrast

On white

9.53
#512AA2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.20
#512AA2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512AA2
9.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512AA2#FFFFFF#000000##FFFFFF
##512AA21.009.532.209.53
#FFFFFF9.531.0021.001.00
#0000002.2021.001.0021.00
##FFFFFF9.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047A5
Deuteranopia (green-blind)
#0043A0
Tritanopia (blue-blind)
#364A64
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #512aa2;
/* rgb */ color: rgb(81, 42, 162);
/* oklch */ color: oklch(41.2% 0.180 291.3);
Tailwind
colors: {
  custom: {
    50: '#8a67bf',
    500: '#512aa2',
    950: '#000000',
  },
}
SCSS
$custom: #512aa2;
$custom-light: #8a67bf;
$custom-dark: #000000;
JSON
{
  "hex": "#512aa2",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 162
  },
  "hsl": {
    "h": 259.5,
    "s": 58.824,
    "l": 40
  },
  "oklch": {
    "l": 0.41221,
    "c": 0.17972,
    "h": 291.3
  },
  "luminance": 0.06014
}

Semantic roles & 50–950 ramp

primary
#512AA2
secondary
#A3C068
accent
#E246AF
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0D0612
muted
#7D7A81

Preview Lab

Preview with #512AA2

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

Preview Lab → · Contrast checker → · Palette generator →

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