#512EA7#512EA7

#512EA7 is a dark, vivid violet. Relative luminance 0.065; OKLCH L 42.2% C 0.181 H 289.5°. Best body text is #FFFFFF at 9.14:1 contrast (WCAG AA passes).

Color values

HEX#512EA7
RGBrgb(81, 46, 167)
HSLhsl(257, 57%, 42%)
HSVhsv(257, 72%, 65%)
CMYKcmyk(51.5%, 72.5%, 0%, 34.5%)
CIE-LABlab(30.62, 45.21, -59.44)
CIE-LCHlch(30.62, 74.68, 307.26°)
OKLaboklab(42.19% 0.0606 -0.1707)
OKLCHoklch(42.19% 0.181 289.5)
XYZxyz(11.3434, 6.4928, 37.2073)
Luminance0.0649 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512EA7 #84A72E
analogous
#2E48A7 #512EA7 #8E2EA7
triadic
#512EA7 #A7512E #2EA751
tetradic
#512EA7 #A72E48 #84A72E #2EA78E
square
#512EA7 #A72E48 #84A72E #2EA78E
split-complementary
#512EA7 #A78E2E #48A72E
monochromatic
#221447 #3A2177 #512EA7 #6D46CC #9376D9

Accessibility & contrast

On white

9.14
#512EA7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.30
#512EA7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512EA7
9.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512EA7#FFFFFF#000000##FFFFFF
##512EA71.009.142.309.14
#FFFFFF9.141.0021.001.00
#0000002.3021.001.0021.00
##FFFFFF9.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AAB
Deuteranopia (green-blind)
#0045A5
Tritanopia (blue-blind)
#324E67
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #512ea7;
/* rgb */ color: rgb(81, 46, 167);
/* oklch */ color: oklch(42.2% 0.181 289.5);
Tailwind
colors: {
  custom: {
    50: '#8a6ac2',
    500: '#512ea7',
    950: '#000000',
  },
}
SCSS
$custom: #512ea7;
$custom-light: #8a6ac2;
$custom-dark: #000000;
JSON
{
  "hex": "#512ea7",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 167
  },
  "hsl": {
    "h": 257.355,
    "s": 56.808,
    "l": 41.765
  },
  "oklch": {
    "l": 0.42191,
    "c": 0.18112,
    "h": 289.5
  },
  "luminance": 0.06493
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #512EA7

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

Preview Lab → · Contrast checker → · Palette generator →

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