#512FA3#512FA3

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

Color values

HEX#512FA3
RGBrgb(81, 47, 163)
HSLhsl(258, 55%, 41%)
HSVhsv(258, 71%, 64%)
CMYKcmyk(50.3%, 71.2%, 0%, 36.1%)
CIE-LABlab(30.46, 43.53, -57.29)
CIE-LCHlch(30.46, 71.95, 307.23°)
OKLaboklab(41.97% 0.0605 -0.1644)
OKLCHoklch(41.97% 0.175 290.2)
XYZxyz(11.0188, 6.4263, 35.3030)
Luminance0.0643 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512FA3 #81A32F
analogous
#2F47A3 #512FA3 #8B2FA3
triadic
#512FA3 #A3512F #2FA351
tetradic
#512FA3 #A32F47 #81A32F #2FA38B
square
#512FA3 #A32F47 #81A32F #2FA38B
split-complementary
#512FA3 #A38B2F #47A32F
monochromatic
#221444 #392173 #512FA3 #6C46CA #9275D7

Accessibility & contrast

On white

9.19
#512FA3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512FA3
9.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512FA3#FFFFFF#000000##FFFFFF
##512FA31.009.192.299.19
#FFFFFF9.191.0021.001.00
#0000002.2921.001.0021.00
##FFFFFF9.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AA6
Deuteranopia (green-blind)
#0045A1
Tritanopia (blue-blind)
#354D65
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #512fa3;
/* rgb */ color: rgb(81, 47, 163);
/* oklch */ color: oklch(42.0% 0.175 290.2);
Tailwind
colors: {
  custom: {
    50: '#8a6abf',
    500: '#512fa3',
    950: '#000000',
  },
}
SCSS
$custom: #512fa3;
$custom-light: #8a6abf;
$custom-dark: #000000;
JSON
{
  "hex": "#512fa3",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 163
  },
  "hsl": {
    "h": 257.586,
    "s": 55.238,
    "l": 41.176
  },
  "oklch": {
    "l": 0.41969,
    "c": 0.17516,
    "h": 290.2
  },
  "luminance": 0.06427
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #512FA3

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

Preview Lab → · Contrast checker → · Palette generator →

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