#512AA8#512AA8

#512AA8 is a dark, vivid violet. Relative luminance 0.062; OKLCH L 41.8% C 0.187 H 290.0°. Best body text is #FFFFFF at 9.35:1 contrast (WCAG AA passes).

Color values

HEX#512AA8
RGBrgb(81, 42, 168)
HSLhsl(259, 60%, 41%)
HSVhsv(259, 75%, 66%)
CMYKcmyk(51.8%, 75%, 0%, 34.1%)
CIE-LABlab(29.99, 47.53, -61.08)
CIE-LCHlch(29.99, 77.39, 307.89°)
OKLaboklab(41.77% 0.0638 -0.1755)
OKLCHoklch(41.77% 0.187 290)
XYZxyz(11.2871, 6.2319, 37.6463)
Luminance0.0623 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512AA8 #81A82A
analogous
#2A42A8 #512AA8 #902AA8
triadic
#512AA8 #A8512A #2AA851
tetradic
#512AA8 #A82A42 #81A82A #2AA890
square
#512AA8 #A82A42 #81A82A #2AA890
split-complementary
#512AA8 #A8902A #42A82A
monochromatic
#221246 #391E77 #512AA8 #6C40CF #9271DB

Accessibility & contrast

On white

9.35
#512AA8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.25
#512AA8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512AA8
9.35:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512AA8#FFFFFF#000000##FFFFFF
##512AA81.009.352.259.35
#FFFFFF9.351.0021.001.00
#0000002.2521.001.0021.00
##FFFFFF9.351.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0049AC
Deuteranopia (green-blind)
#0044A6
Tritanopia (blue-blind)
#324C67
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #512aa8;
/* rgb */ color: rgb(81, 42, 168);
/* oklch */ color: oklch(41.8% 0.187 290.0);
Tailwind
colors: {
  custom: {
    50: '#8b68c3',
    500: '#512aa8',
    950: '#000000',
  },
}
SCSS
$custom: #512aa8;
$custom-light: #8b68c3;
$custom-dark: #000000;
JSON
{
  "hex": "#512aa8",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 168
  },
  "hsl": {
    "h": 258.571,
    "s": 60,
    "l": 41.176
  },
  "oklch": {
    "l": 0.41771,
    "c": 0.1867,
    "h": 290
  },
  "luminance": 0.06232
}

Semantic roles & 50–950 ramp

primary
#512AA8
secondary
#A8C36B
accent
#E345B2
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0613
muted
#7E7A82

Preview Lab

Preview with #512AA8

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

Preview Lab → · Contrast checker → · Palette generator →

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