#512EA4#512EA4

#512EA4 is a dark, vivid violet. Relative luminance 0.064; OKLCH L 41.9% C 0.178 H 290.2°. Best body text is #FFFFFF at 9.22:1 contrast (WCAG AA passes).

Color values

HEX#512EA4
RGBrgb(81, 46, 164)
HSLhsl(258, 56%, 41%)
HSVhsv(258, 72%, 64%)
CMYKcmyk(50.6%, 72%, 0%, 35.7%)
CIE-LABlab(30.36, 44.35, -58.06)
CIE-LCHlch(30.36, 73.06, 307.37°)
OKLaboklab(41.92% 0.0612 -0.1667)
OKLCHoklch(41.92% 0.178 290.2)
XYZxyz(11.0693, 6.3832, 35.7636)
Luminance0.0638 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512EA4 #81A42E
analogous
#2E46A4 #512EA4 #8C2EA4
triadic
#512EA4 #A4512E #2EA451
tetradic
#512EA4 #A42E46 #81A42E #2EA48C
square
#512EA4 #A42E46 #81A42E #2EA48C
split-complementary
#512EA4 #A48C2E #46A42E
monochromatic
#221344 #392174 #512EA4 #6C45CB #9274D8

Accessibility & contrast

On white

9.22
#512EA4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.28
#512EA4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512EA4
9.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512EA4#FFFFFF#000000##FFFFFF
##512EA41.009.222.289.22
#FFFFFF9.221.0021.001.00
#0000002.2821.001.0021.00
##FFFFFF9.221.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #512ea4;
/* rgb */ color: rgb(81, 46, 164);
/* oklch */ color: oklch(41.9% 0.178 290.2);
Tailwind
colors: {
  custom: {
    50: '#8a6ac0',
    500: '#512ea4',
    950: '#000000',
  },
}
SCSS
$custom: #512ea4;
$custom-light: #8a6ac0;
$custom-dark: #000000;
JSON
{
  "hex": "#512ea4",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 164
  },
  "hsl": {
    "h": 257.797,
    "s": 56.19,
    "l": 41.176
  },
  "oklch": {
    "l": 0.41922,
    "c": 0.17754,
    "h": 290.2
  },
  "luminance": 0.06384
}

Semantic roles & 50–950 ramp

primary
#512EA4
secondary
#A8C06E
accent
#DF48B3
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0D0712
muted
#7D7A81

Preview Lab

Preview with #512EA4

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

Preview Lab → · Contrast checker → · Palette generator →

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