#512CB5#512CB5

#512CB5 is a dark, vivid violet. Relative luminance 0.069; OKLCH L 43.2% C 0.200 H 287.1°. Best body text is #FFFFFF at 8.83:1 contrast (WCAG AA passes).

Color values

HEX#512CB5
RGBrgb(81, 44, 181)
HSLhsl(256, 61%, 44%)
HSVhsv(256, 76%, 71%)
CMYKcmyk(55.2%, 75.7%, 0%, 29%)
CIE-LABlab(31.55, 50.22, -66.30)
CIE-LCHlch(31.55, 83.17, 307.14°)
OKLaboklab(43.23% 0.0588 -0.1908)
OKLCHoklch(43.23% 0.2 287.1)
XYZxyz(12.6320, 6.8862, 44.3707)
Luminance0.0689 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512CB5 #90B52C
analogous
#2C4CB5 #512CB5 #962CB5
triadic
#512CB5 #B5512C #2CB551
tetradic
#512CB5 #B52C4C #90B52C #2CB596
square
#512CB5 #B52C4C #90B52C #2CB596
split-complementary
#512CB5 #B5962C #4CB52C
monochromatic
#251453 #3B2084 #512CB5 #704BD3 #977CDF

Accessibility & contrast

On white

8.83
#512CB5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.38
#512CB5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512CB5
8.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512CB5#FFFFFF#000000##FFFFFF
##512CB51.008.832.388.83
#FFFFFF8.831.0021.001.00
#0000002.3821.001.0021.00
##FFFFFF8.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004DB9
Deuteranopia (green-blind)
#0046B2
Tritanopia (blue-blind)
#25526F
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #512cb5;
/* rgb */ color: rgb(81, 44, 181);
/* oklch */ color: oklch(43.2% 0.200 287.1);
Tailwind
colors: {
  custom: {
    50: '#8d69cc',
    500: '#512cb5',
    950: '#000000',
  },
}
SCSS
$custom: #512cb5;
$custom-light: #8d69cc;
$custom-dark: #000000;
JSON
{
  "hex": "#512cb5",
  "rgb": {
    "r": 81,
    "g": 44,
    "b": 181
  },
  "hsl": {
    "h": 256.204,
    "s": 60.889,
    "l": 44.118
  },
  "oklch": {
    "l": 0.43234,
    "c": 0.19965,
    "h": 287.1
  },
  "luminance": 0.06887
}

Semantic roles & 50–950 ramp

primary
#512CB5
secondary
#B1C875
accent
#E444B9
background
#F9F6FC
surface
#F2EBF9
border
#CCC6D2
text
#0D0714
muted
#7E7A82

Preview Lab

Preview with #512CB5

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

Preview Lab → · Contrast checker → · Palette generator →

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