#512EB5#512EB5

#512EB5 is a dark, vivid violet. Relative luminance 0.070; OKLCH L 43.5% C 0.198 H 286.9°. Best body text is #FFFFFF at 8.72:1 contrast (WCAG AA passes).

Color values

HEX#512EB5
RGBrgb(81, 46, 181)
HSLhsl(256, 59%, 45%)
HSVhsv(256, 75%, 71%)
CMYKcmyk(55.2%, 74.6%, 0%, 29%)
CIE-LABlab(31.90, 49.23, -65.73)
CIE-LCHlch(31.90, 82.12, 306.83°)
OKLaboklab(43.48% 0.0573 -0.1891)
OKLCHoklch(43.48% 0.198 286.9)
XYZxyz(12.7083, 7.0388, 44.3961)
Luminance0.0704 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512EB5 #92B52E
analogous
#2E4EB5 #512EB5 #952EB5
triadic
#512EB5 #B5512E #2EB551
tetradic
#512EB5 #B52E4E #92B52E #2EB595
square
#512EB5 #B52E4E #92B52E #2EB595
split-complementary
#512EB5 #B5952E #4EB52E
monochromatic
#251553 #3B2284 #512EB5 #704ED2 #987FDE

Accessibility & contrast

On white

8.72
#512EB5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.41
#512EB5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512EB5
8.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512EB5#FFFFFF#000000##FFFFFF
##512EB51.008.722.418.72
#FFFFFF8.721.0021.001.00
#0000002.4121.001.0021.00
##FFFFFF8.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004EB9
Deuteranopia (green-blind)
#0047B2
Tritanopia (blue-blind)
#25536F
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #512eb5;
/* rgb */ color: rgb(81, 46, 181);
/* oklch */ color: oklch(43.5% 0.198 286.9);
Tailwind
colors: {
  custom: {
    50: '#8d6bcc',
    500: '#512eb5',
    950: '#000000',
  },
}
SCSS
$custom: #512eb5;
$custom-light: #8d6bcc;
$custom-dark: #000000;
JSON
{
  "hex": "#512eb5",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 181
  },
  "hsl": {
    "h": 255.556,
    "s": 59.471,
    "l": 44.51
  },
  "oklch": {
    "l": 0.43479,
    "c": 0.19761,
    "h": 286.9
  },
  "luminance": 0.0704
}

Semantic roles & 50–950 ramp

primary
#512EB5
secondary
#B3C778
accent
#E345BA
background
#F9F6FC
surface
#F1EBF9
border
#CBC6D2
text
#0D0714
muted
#7E7A82

Preview Lab

Preview with #512EB5

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

Preview Lab → · Contrast checker → · Palette generator →

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