#512FA1#512FA1

#512FA1 is a dark, vivid violet. Relative luminance 0.064; OKLCH L 41.8% C 0.173 H 290.6°. Best body text is #FFFFFF at 9.25:1 contrast (WCAG AA passes).

Color values

HEX#512FA1
RGBrgb(81, 47, 161)
HSLhsl(258, 55%, 41%)
HSVhsv(258, 71%, 63%)
CMYKcmyk(49.7%, 70.8%, 0%, 36.9%)
CIE-LABlab(30.29, 42.95, -56.36)
CIE-LCHlch(30.29, 70.86, 307.31°)
OKLaboklab(41.79% 0.0609 -0.1617)
OKLCHoklch(41.79% 0.173 290.6)
XYZxyz(10.8410, 6.3551, 34.3668)
Luminance0.0636 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512FA1 #7FA12F
analogous
#2F46A1 #512FA1 #8A2FA1
triadic
#512FA1 #A1512F #2FA151
tetradic
#512FA1 #A12F46 #7FA12F #2FA18A
square
#512FA1 #A12F46 #7FA12F #2FA18A
split-complementary
#512FA1 #A18A2F #46A12F
monochromatic
#211342 #392172 #512FA1 #6C45C9 #9174D6

Accessibility & contrast

On white

9.25
#512FA1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.27
#512FA1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512FA1
9.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512FA1#FFFFFF#000000##FFFFFF
##512FA11.009.252.279.25
#FFFFFF9.251.0021.001.00
#0000002.2721.001.0021.00
##FFFFFF9.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0049A4
Deuteranopia (green-blind)
#00459F
Tritanopia (blue-blind)
#364C64
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #512fa1;
/* rgb */ color: rgb(81, 47, 161);
/* oklch */ color: oklch(41.8% 0.173 290.6);
Tailwind
colors: {
  custom: {
    50: '#8a6abe',
    500: '#512fa1',
    950: '#000000',
  },
}
SCSS
$custom: #512fa1;
$custom-light: #8a6abe;
$custom-dark: #000000;
JSON
{
  "hex": "#512fa1",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 161
  },
  "hsl": {
    "h": 257.895,
    "s": 54.808,
    "l": 40.784
  },
  "oklch": {
    "l": 0.41793,
    "c": 0.17273,
    "h": 290.6
  },
  "luminance": 0.06356
}

Semantic roles & 50–950 ramp

primary
#512FA1
secondary
#A6BE6E
accent
#DE4AB2
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0C0712
muted
#7D7A81

Preview Lab

Preview with #512FA1

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

Preview Lab → · Contrast checker → · Palette generator →

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