#512CB2#512CB2

#512CB2 is a dark, vivid violet. Relative luminance 0.068; OKLCH L 43.0% C 0.196 H 287.7°. Best body text is #FFFFFF at 8.92:1 contrast (WCAG AA passes).

Color values

HEX#512CB2
RGBrgb(81, 44, 178)
HSLhsl(257, 60%, 44%)
HSVhsv(257, 75%, 70%)
CMYKcmyk(54.5%, 75.3%, 0%, 30.2%)
CIE-LABlab(31.26, 49.37, -64.98)
CIE-LCHlch(31.26, 81.61, 307.23°)
OKLaboklab(42.95% 0.0596 -0.1869)
OKLCHoklch(42.95% 0.196 287.7)
XYZxyz(12.3275, 6.7644, 42.7669)
Luminance0.0677 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512CB2 #8DB22C
analogous
#2C4AB2 #512CB2 #942CB2
triadic
#512CB2 #B2512C #2CB251
tetradic
#512CB2 #B22C4A #8DB22C #2CB294
square
#512CB2 #B22C4A #8DB22C #2CB294
split-complementary
#512CB2 #B2942C #4AB22C
monochromatic
#241450 #3B2081 #512CB2 #6F49D2 #967ADE

Accessibility & contrast

On white

8.92
#512CB2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.35
#512CB2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512CB2
8.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512CB2#FFFFFF#000000##FFFFFF
##512CB21.008.922.358.92
#FFFFFF8.921.0021.001.00
#0000002.3521.001.0021.00
##FFFFFF8.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004DB6
Deuteranopia (green-blind)
#0046B0
Tritanopia (blue-blind)
#29516D
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #512cb2;
/* rgb */ color: rgb(81, 44, 178);
/* oklch */ color: oklch(43.0% 0.196 287.7);
Tailwind
colors: {
  custom: {
    50: '#8c69ca',
    500: '#512cb2',
    950: '#000000',
  },
}
SCSS
$custom: #512cb2;
$custom-light: #8c69ca;
$custom-dark: #000000;
JSON
{
  "hex": "#512cb2",
  "rgb": {
    "r": 81,
    "g": 44,
    "b": 178
  },
  "hsl": {
    "h": 256.567,
    "s": 60.36,
    "l": 43.529
  },
  "oklch": {
    "l": 0.4295,
    "c": 0.19619,
    "h": 287.7
  },
  "luminance": 0.06765
}

Semantic roles & 50–950 ramp

primary
#512CB2
secondary
#AFC673
accent
#E444B8
background
#F9F6FC
surface
#F1EBF9
border
#CBC6D2
text
#0D0713
muted
#7E7A82

Preview Lab

Preview with #512CB2

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

Preview Lab → · Contrast checker → · Palette generator →

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