#512EB7#512EB7

#512EB7 is a dark, vivid violet. Relative luminance 0.071; OKLCH L 43.7% C 0.200 H 286.5°. Best body text is #FFFFFF at 8.66:1 contrast (WCAG AA passes).

Color values

HEX#512EB7
RGBrgb(81, 46, 183)
HSLhsl(255, 60%, 45%)
HSVhsv(255, 75%, 72%)
CMYKcmyk(55.7%, 74.9%, 0%, 28.2%)
CIE-LABlab(32.08, 49.80, -66.61)
CIE-LCHlch(32.08, 83.17, 306.79°)
OKLaboklab(43.67% 0.0568 -0.1917)
OKLCHoklch(43.67% 0.2 286.5)
XYZxyz(12.9150, 7.1215, 45.4846)
Luminance0.0712 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512EB7 #94B72E
analogous
#2E50B7 #512EB7 #952EB7
triadic
#512EB7 #B7512E #2EB751
tetradic
#512EB7 #B72E50 #94B72E #2EB795
square
#512EB7 #B72E50 #94B72E #2EB795
split-complementary
#512EB7 #B7952E #50B72E
monochromatic
#261555 #3B2286 #512EB7 #714FD3 #9880DF

Accessibility & contrast

On white

8.66
#512EB7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.42
#512EB7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512EB7
8.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512EB7#FFFFFF#000000##FFFFFF
##512EB71.008.662.428.66
#FFFFFF8.661.0021.001.00
#0000002.4221.001.0021.00
##FFFFFF8.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004FBB
Deuteranopia (green-blind)
#0047B4
Tritanopia (blue-blind)
#235470
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #512eb7;
/* rgb */ color: rgb(81, 46, 183);
/* oklch */ color: oklch(43.7% 0.200 286.5);
Tailwind
colors: {
  custom: {
    50: '#8d6bce',
    500: '#512eb7',
    950: '#000000',
  },
}
SCSS
$custom: #512eb7;
$custom-light: #8d6bce;
$custom-dark: #000000;
JSON
{
  "hex": "#512eb7",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 183
  },
  "hsl": {
    "h": 255.328,
    "s": 59.825,
    "l": 44.902
  },
  "oklch": {
    "l": 0.43667,
    "c": 0.19993,
    "h": 286.5
  },
  "luminance": 0.07122
}

Semantic roles & 50–950 ramp

primary
#512EB7
secondary
#B4C879
accent
#E345BB
background
#F9F6FC
surface
#F2EBF9
border
#CCC6D2
text
#0D0714
muted
#7E7A82

Preview Lab

Preview with #512EB7

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

Preview Lab → · Contrast checker → · Palette generator →

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