#512FA2#512FA2

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

Color values

HEX#512FA2
RGBrgb(81, 47, 162)
HSLhsl(258, 55%, 41%)
HSVhsv(258, 71%, 64%)
CMYKcmyk(50%, 71%, 0%, 36.5%)
CIE-LABlab(30.38, 43.24, -56.82)
CIE-LCHlch(30.38, 71.41, 307.27°)
OKLaboklab(41.88% 0.0607 -0.163)
OKLCHoklch(41.88% 0.174 290.4)
XYZxyz(10.9296, 6.3906, 34.8330)
Luminance0.0639 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512FA2 #80A22F
analogous
#2F46A2 #512FA2 #8A2FA2
triadic
#512FA2 #A2512F #2FA251
tetradic
#512FA2 #A22F46 #80A22F #2FA28A
square
#512FA2 #A22F46 #80A22F #2FA28A
split-complementary
#512FA2 #A28A2F #46A22F
monochromatic
#221343 #392173 #512FA2 #6C45C9 #9275D7

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##512FA2#FFFFFF#000000##FFFFFF
##512FA21.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)
#004AA5
Deuteranopia (green-blind)
#0045A0
Tritanopia (blue-blind)
#364D65
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #512fa2;
/* rgb */ color: rgb(81, 47, 162);
/* oklch */ color: oklch(41.9% 0.174 290.4);
Tailwind
colors: {
  custom: {
    50: '#8a6abe',
    500: '#512fa2',
    950: '#000000',
  },
}
SCSS
$custom: #512fa2;
$custom-light: #8a6abe;
$custom-dark: #000000;
JSON
{
  "hex": "#512fa2",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 162
  },
  "hsl": {
    "h": 257.739,
    "s": 55.024,
    "l": 40.98
  },
  "oklch": {
    "l": 0.41881,
    "c": 0.17395,
    "h": 290.4
  },
  "luminance": 0.06391
}

Semantic roles & 50–950 ramp

primary
#512FA2
secondary
#A7BF6E
accent
#DE49B2
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0C0712
muted
#7D7A81

Preview Lab

Preview with #512FA2

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

Preview Lab → · Contrast checker → · Palette generator →

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