#512EA8#512EA8

#512EA8 is a dark, vivid violet. Relative luminance 0.065; OKLCH L 42.3% C 0.182 H 289.3°. Best body text is #FFFFFF at 9.11:1 contrast (WCAG AA passes).

Color values

HEX#512EA8
RGBrgb(81, 46, 168)
HSLhsl(257, 57%, 42%)
HSVhsv(257, 73%, 66%)
CMYKcmyk(51.8%, 72.6%, 0%, 34.1%)
CIE-LABlab(30.71, 45.50, -59.90)
CIE-LCHlch(30.71, 75.22, 307.22°)
OKLaboklab(42.28% 0.0603 -0.172)
OKLCHoklch(42.28% 0.182 289.3)
XYZxyz(11.4362, 6.5300, 37.6960)
Luminance0.0653 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512EA8 #85A82E
analogous
#2E48A8 #512EA8 #8E2EA8
triadic
#512EA8 #A8512E #2EA851
tetradic
#512EA8 #A82E48 #85A82E #2EA88E
square
#512EA8 #A82E48 #85A82E #2EA88E
split-complementary
#512EA8 #A88E2E #48A82E
monochromatic
#231448 #3A2178 #512EA8 #6D47CD #9377DA

Accessibility & contrast

On white

9.11
#512EA8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.31
#512EA8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512EA8
9.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512EA8#FFFFFF#000000##FFFFFF
##512EA81.009.112.319.11
#FFFFFF9.111.0021.001.00
#0000002.3121.001.0021.00
##FFFFFF9.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BAC
Deuteranopia (green-blind)
#0045A6
Tritanopia (blue-blind)
#314E68
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #512ea8;
/* rgb */ color: rgb(81, 46, 168);
/* oklch */ color: oklch(42.3% 0.182 289.3);
Tailwind
colors: {
  custom: {
    50: '#8b6ac3',
    500: '#512ea8',
    950: '#000000',
  },
}
SCSS
$custom: #512ea8;
$custom-light: #8b6ac3;
$custom-dark: #000000;
JSON
{
  "hex": "#512ea8",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 168
  },
  "hsl": {
    "h": 257.213,
    "s": 57.009,
    "l": 41.961
  },
  "oklch": {
    "l": 0.42281,
    "c": 0.18231,
    "h": 289.3
  },
  "luminance": 0.0653
}

Semantic roles & 50–950 ramp

primary
#512EA8
secondary
#AAC270
accent
#E048B4
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0713
muted
#7E7A82

Preview Lab

Preview with #512EA8

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

Preview Lab → · Contrast checker → · Palette generator →

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