#512AB5#512AB5

#512AB5 is a dark, highly saturated violet. Relative luminance 0.067; OKLCH L 43.0% C 0.202 H 287.4°. Best body text is #FFFFFF at 8.94:1 contrast (WCAG AA passes).

Color values

HEX#512AB5
RGBrgb(81, 42, 181)
HSLhsl(257, 62%, 44%)
HSVhsv(257, 77%, 71%)
CMYKcmyk(55.2%, 76.8%, 0%, 29%)
CIE-LABlab(31.21, 51.18, -66.86)
CIE-LCHlch(31.21, 84.20, 307.44°)
OKLaboklab(43% 0.0603 -0.1924)
OKLCHoklch(43% 0.202 287.4)
XYZxyz(12.5593, 6.7408, 44.3464)
Luminance0.0674 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512AB5 #8EB52A
analogous
#2A48B5 #512AB5 #962AB5
triadic
#512AB5 #B5512A #2AB551
tetradic
#512AB5 #B52A48 #8EB52A #2AB596
square
#512AB5 #B52A48 #8EB52A #2AB596
split-complementary
#512AB5 #B5962A #48B52A
monochromatic
#251352 #3B1E83 #512AB5 #6F48D4 #9679E0

Accessibility & contrast

On white

8.94
#512AB5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512AB5
8.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512AB5#FFFFFF#000000##FFFFFF
##512AB51.008.942.358.94
#FFFFFF8.941.0021.001.00
#0000002.3521.001.0021.00
##FFFFFF8.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004DB9
Deuteranopia (green-blind)
#0046B2
Tritanopia (blue-blind)
#25516E
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #512ab5;
/* rgb */ color: rgb(81, 42, 181);
/* oklch */ color: oklch(43.0% 0.202 287.4);
Tailwind
colors: {
  custom: {
    50: '#8d68cc',
    500: '#512ab5',
    950: '#000000',
  },
}
SCSS
$custom: #512ab5;
$custom-light: #8d68cc;
$custom-dark: #000000;
JSON
{
  "hex": "#512ab5",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 181
  },
  "hsl": {
    "h": 256.835,
    "s": 62.332,
    "l": 43.725
  },
  "oklch": {
    "l": 0.42997,
    "c": 0.20161,
    "h": 287.4
  },
  "luminance": 0.06741
}

Semantic roles & 50–950 ramp

primary
#512AB5
secondary
#B0C873
accent
#E542B8
background
#F9F6FC
surface
#F2EBF9
border
#CCC6D2
text
#0D0614
muted
#7E7A82

Preview Lab

Preview with #512AB5

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

Preview Lab → · Contrast checker → · Palette generator →

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