#512EA5#512EA5

#512EA5 is a dark, vivid violet. Relative luminance 0.064; OKLCH L 42.0% C 0.179 H 289.9°. Best body text is #FFFFFF at 9.19:1 contrast (WCAG AA passes).

Color values

HEX#512EA5
RGBrgb(81, 46, 165)
HSLhsl(258, 56%, 41%)
HSVhsv(258, 72%, 65%)
CMYKcmyk(50.9%, 72.1%, 0%, 35.3%)
CIE-LABlab(30.45, 44.63, -58.52)
CIE-LCHlch(30.45, 73.60, 307.33°)
OKLaboklab(42.01% 0.061 -0.168)
OKLCHoklch(42.01% 0.179 289.9)
XYZxyz(11.1599, 6.4195, 36.2411)
Luminance0.0642 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512EA5 #82A52E
analogous
#2E47A5 #512EA5 #8D2EA5
triadic
#512EA5 #A5512E #2EA551
tetradic
#512EA5 #A52E47 #82A52E #2EA58D
square
#512EA5 #A52E47 #82A52E #2EA58D
split-complementary
#512EA5 #A58D2E #47A52E
monochromatic
#221345 #3A2175 #512EA5 #6C45CB #9275D8

Accessibility & contrast

On white

9.19
#512EA5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.28
#512EA5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512EA5
9.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512EA5#FFFFFF#000000##FFFFFF
##512EA51.009.192.289.19
#FFFFFF9.191.0021.001.00
#0000002.2821.001.0021.00
##FFFFFF9.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AA9
Deuteranopia (green-blind)
#0045A3
Tritanopia (blue-blind)
#344D66
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #512ea5;
/* rgb */ color: rgb(81, 46, 165);
/* oklch */ color: oklch(42.0% 0.179 289.9);
Tailwind
colors: {
  custom: {
    50: '#8a6ac1',
    500: '#512ea5',
    950: '#000000',
  },
}
SCSS
$custom: #512ea5;
$custom-light: #8a6ac1;
$custom-dark: #000000;
JSON
{
  "hex": "#512ea5",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 165
  },
  "hsl": {
    "h": 257.647,
    "s": 56.398,
    "l": 41.373
  },
  "oklch": {
    "l": 0.42011,
    "c": 0.17873,
    "h": 289.9
  },
  "luminance": 0.0642
}

Semantic roles & 50–950 ramp

primary
#512EA5
secondary
#A8C06F
accent
#E048B3
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0D0712
muted
#7D7A81

Preview Lab

Preview with #512EA5

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

Preview Lab → · Contrast checker → · Palette generator →

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