#512AB9#512AB9

#512AB9 is a dark, highly saturated violet. Relative luminance 0.069; OKLCH L 43.4% C 0.206 H 286.7°. Best body text is #FFFFFF at 8.82:1 contrast (WCAG AA passes).

Color values

HEX#512AB9
RGBrgb(81, 42, 185)
HSLhsl(256, 63%, 45%)
HSVhsv(256, 77%, 73%)
CMYKcmyk(56.2%, 77.3%, 0%, 27.5%)
CIE-LABlab(31.59, 52.30, -68.59)
CIE-LCHlch(31.59, 86.26, 307.33°)
OKLaboklab(43.38% 0.0591 -0.1975)
OKLCHoklch(43.38% 0.206 286.7)
XYZxyz(12.9756, 6.9073, 46.5391)
Luminance0.0691 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512AB9 #92B92A
analogous
#2A4AB9 #512AB9 #992AB9
triadic
#512AB9 #B9512A #2AB951
tetradic
#512AB9 #B92A4A #92B92A #2AB999
square
#512AB9 #B92A4A #92B92A #2AB999
split-complementary
#512AB9 #B9992A #4AB92A
monochromatic
#251355 #3B1F87 #512AB9 #704AD6 #987CE1

Accessibility & contrast

On white

8.82
#512AB9 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512AB9
8.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512AB9#FFFFFF#000000##FFFFFF
##512AB91.008.822.388.82
#FFFFFF8.821.0021.001.00
#0000002.3821.001.0021.00
##FFFFFF8.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004EBD
Deuteranopia (green-blind)
#0046B6
Tritanopia (blue-blind)
#205371
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #512ab9;
/* rgb */ color: rgb(81, 42, 185);
/* oklch */ color: oklch(43.4% 0.206 286.7);
Tailwind
colors: {
  custom: {
    50: '#8e69cf',
    500: '#512ab9',
    950: '#000000',
  },
}
SCSS
$custom: #512ab9;
$custom-light: #8e69cf;
$custom-dark: #000000;
JSON
{
  "hex": "#512ab9",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 185
  },
  "hsl": {
    "h": 256.364,
    "s": 62.996,
    "l": 44.51
  },
  "oklch": {
    "l": 0.43383,
    "c": 0.20615,
    "h": 286.7
  },
  "luminance": 0.06908
}

Semantic roles & 50–950 ramp

primary
#512AB9
secondary
#B3CA75
accent
#E642B9
background
#F9F6FC
surface
#F2EBF9
border
#CCC6D2
text
#0D0614
muted
#7E7A82

Preview Lab

Preview with #512AB9

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

Preview Lab → · Contrast checker → · Palette generator →

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