#512FA4#512FA4

#512FA4 is a dark, vivid violet. Relative luminance 0.065; OKLCH L 42.1% C 0.176 H 290.0°. Best body text is #FFFFFF at 9.16:1 contrast (WCAG AA passes).

Color values

HEX#512FA4
RGBrgb(81, 47, 164)
HSLhsl(257, 55%, 41%)
HSVhsv(257, 71%, 64%)
CMYKcmyk(50.6%, 71.3%, 0%, 35.7%)
CIE-LABlab(30.55, 43.82, -57.75)
CIE-LCHlch(30.55, 72.49, 307.19°)
OKLaboklab(42.06% 0.0603 -0.1657)
OKLCHoklch(42.06% 0.176 290)
XYZxyz(11.1088, 6.4622, 35.7768)
Luminance0.0646 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512FA4 #82A42F
analogous
#2F48A4 #512FA4 #8C2FA4
triadic
#512FA4 #A4512F #2FA451
tetradic
#512FA4 #A42F48 #82A42F #2FA48C
square
#512FA4 #A42F48 #82A42F #2FA48C
split-complementary
#512FA4 #A48C2F #48A42F
monochromatic
#221445 #3A2174 #512FA4 #6C46CA #9276D8

Accessibility & contrast

On white

9.16
#512FA4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.29
#512FA4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512FA4
9.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512FA4#FFFFFF#000000##FFFFFF
##512FA41.009.162.299.16
#FFFFFF9.161.0021.001.00
#0000002.2921.001.0021.00
##FFFFFF9.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AA7
Deuteranopia (green-blind)
#0045A2
Tritanopia (blue-blind)
#344D66
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #512fa4;
/* rgb */ color: rgb(81, 47, 164);
/* oklch */ color: oklch(42.1% 0.176 290.0);
Tailwind
colors: {
  custom: {
    50: '#8a6ac0',
    500: '#512fa4',
    950: '#000000',
  },
}
SCSS
$custom: #512fa4;
$custom-light: #8a6ac0;
$custom-dark: #000000;
JSON
{
  "hex": "#512fa4",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 164
  },
  "hsl": {
    "h": 257.436,
    "s": 55.45,
    "l": 41.373
  },
  "oklch": {
    "l": 0.42057,
    "c": 0.17637,
    "h": 290
  },
  "luminance": 0.06463
}

Semantic roles & 50–950 ramp

primary
#512FA4
secondary
#A8C06F
accent
#DF49B3
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0D0712
muted
#7D7A81

Preview Lab

Preview with #512FA4

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

Preview Lab → · Contrast checker → · Palette generator →

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