#512EA6#512EA6

#512EA6 is a dark, vivid violet. Relative luminance 0.065; OKLCH L 42.1% C 0.180 H 289.7°. Best body text is #FFFFFF at 9.17:1 contrast (WCAG AA passes).

Color values

HEX#512EA6
RGBrgb(81, 46, 166)
HSLhsl(258, 57%, 42%)
HSVhsv(258, 72%, 65%)
CMYKcmyk(51.2%, 72.3%, 0%, 34.9%)
CIE-LABlab(30.53, 44.92, -58.98)
CIE-LCHlch(30.53, 74.14, 307.29°)
OKLaboklab(42.1% 0.0608 -0.1694)
OKLCHoklch(42.1% 0.18 289.7)
XYZxyz(11.2513, 6.4560, 36.7223)
Luminance0.0646 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512EA6 #83A62E
analogous
#2E47A6 #512EA6 #8D2EA6
triadic
#512EA6 #A6512E #2EA651
tetradic
#512EA6 #A62E47 #83A62E #2EA68D
square
#512EA6 #A62E47 #83A62E #2EA68D
split-complementary
#512EA6 #A68D2E #47A62E
monochromatic
#221346 #3A2176 #512EA6 #6D46CC #9276D9

Accessibility & contrast

On white

9.17
#512EA6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.29
#512EA6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512EA6
9.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512EA6#FFFFFF#000000##FFFFFF
##512EA61.009.172.299.17
#FFFFFF9.171.0021.001.00
#0000002.2921.001.0021.00
##FFFFFF9.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AAA
Deuteranopia (green-blind)
#0045A4
Tritanopia (blue-blind)
#334E67
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #512ea6;
/* rgb */ color: rgb(81, 46, 166);
/* oklch */ color: oklch(42.1% 0.180 289.7);
Tailwind
colors: {
  custom: {
    50: '#8a6ac1',
    500: '#512ea6',
    950: '#000000',
  },
}
SCSS
$custom: #512ea6;
$custom-light: #8a6ac1;
$custom-dark: #000000;
JSON
{
  "hex": "#512ea6",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 166
  },
  "hsl": {
    "h": 257.5,
    "s": 56.604,
    "l": 41.569
  },
  "oklch": {
    "l": 0.42101,
    "c": 0.17993,
    "h": 289.7
  },
  "luminance": 0.06456
}

Semantic roles & 50–950 ramp

primary
#512EA6
secondary
#A9C16F
accent
#E048B4
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0712
muted
#7E7A81

Preview Lab

Preview with #512EA6

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

Preview Lab → · Contrast checker → · Palette generator →

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