#512AB3#512AB3

#512AB3 is a dark, vivid violet. Relative luminance 0.067; OKLCH L 42.8% C 0.199 H 287.8°. Best body text is #FFFFFF at 9.01:1 contrast (WCAG AA passes).

Color values

HEX#512AB3
RGBrgb(81, 42, 179)
HSLhsl(257, 62%, 43%)
HSVhsv(257, 77%, 70%)
CMYKcmyk(54.7%, 76.5%, 0%, 29.8%)
CIE-LABlab(31.02, 50.62, -65.98)
CIE-LCHlch(31.02, 83.16, 307.50°)
OKLaboklab(42.81% 0.0608 -0.1898)
OKLCHoklch(42.81% 0.199 287.8)
XYZxyz(12.3556, 6.6593, 43.2734)
Luminance0.0666 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512AB3 #8CB32A
analogous
#2A48B3 #512AB3 #952AB3
triadic
#512AB3 #B3512A #2AB351
tetradic
#512AB3 #B32A48 #8CB32A #2AB395
square
#512AB3 #B32A48 #8CB32A #2AB395
split-complementary
#512AB3 #B3952A #48B32A
monochromatic
#241350 #3B1E81 #512AB3 #6F46D4 #9578DF

Accessibility & contrast

On white

9.01
#512AB3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.33
#512AB3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512AB3
9.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512AB3#FFFFFF#000000##FFFFFF
##512AB31.009.012.339.01
#FFFFFF9.011.0021.001.00
#0000002.3321.001.0021.00
##FFFFFF9.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CB7
Deuteranopia (green-blind)
#0045B0
Tritanopia (blue-blind)
#28516D
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #512ab3;
/* rgb */ color: rgb(81, 42, 179);
/* oklch */ color: oklch(42.8% 0.199 287.8);
Tailwind
colors: {
  custom: {
    50: '#8d68cb',
    500: '#512ab3',
    950: '#000000',
  },
}
SCSS
$custom: #512ab3;
$custom-light: #8d68cb;
$custom-dark: #000000;
JSON
{
  "hex": "#512ab3",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 179
  },
  "hsl": {
    "h": 257.08,
    "s": 61.991,
    "l": 43.333
  },
  "oklch": {
    "l": 0.42806,
    "c": 0.19934,
    "h": 287.8
  },
  "luminance": 0.0666
}

Semantic roles & 50–950 ramp

primary
#512AB3
secondary
#AFC772
accent
#E543B7
background
#F9F6FC
surface
#F1EBF9
border
#CBC6D2
text
#0D0613
muted
#7E7A82

Preview Lab

Preview with #512AB3

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

Preview Lab → · Contrast checker → · Palette generator →

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