#512EA2#512EA2

#512EA2 is a dark, vivid violet. Relative luminance 0.063; OKLCH L 41.7% C 0.175 H 290.6°. Best body text is #FFFFFF at 9.28:1 contrast (WCAG AA passes).

Color values

HEX#512EA2
RGBrgb(81, 46, 162)
HSLhsl(258, 56%, 41%)
HSVhsv(258, 72%, 64%)
CMYKcmyk(50%, 71.6%, 0%, 36.5%)
CIE-LABlab(30.19, 43.77, -57.14)
CIE-LCHlch(30.19, 71.98, 307.46°)
OKLaboklab(41.74% 0.0616 -0.1639)
OKLCHoklch(41.74% 0.175 290.6)
XYZxyz(10.8901, 6.3115, 34.8199)
Luminance0.0631 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512EA2 #7FA22E
analogous
#2E45A2 #512EA2 #8B2EA2
triadic
#512EA2 #A2512E #2EA251
tetradic
#512EA2 #A22E45 #7FA22E #2EA28B
square
#512EA2 #A22E45 #7FA22E #2EA28B
split-complementary
#512EA2 #A28B2E #45A22E
monochromatic
#211343 #392072 #512EA2 #6C43CA #9173D7

Accessibility & contrast

On white

9.28
#512EA2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.26
#512EA2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512EA2
9.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512EA2#FFFFFF#000000##FFFFFF
##512EA21.009.282.269.28
#FFFFFF9.281.0021.001.00
#0000002.2621.001.0021.00
##FFFFFF9.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0049A5
Deuteranopia (green-blind)
#0044A0
Tritanopia (blue-blind)
#364C65
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #512ea2;
/* rgb */ color: rgb(81, 46, 162);
/* oklch */ color: oklch(41.7% 0.175 290.6);
Tailwind
colors: {
  custom: {
    50: '#8a6abe',
    500: '#512ea2',
    950: '#000000',
  },
}
SCSS
$custom: #512ea2;
$custom-light: #8a6abe;
$custom-dark: #000000;
JSON
{
  "hex": "#512ea2",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 162
  },
  "hsl": {
    "h": 258.103,
    "s": 55.769,
    "l": 40.784
  },
  "oklch": {
    "l": 0.41744,
    "c": 0.17513,
    "h": 290.6
  },
  "luminance": 0.06312
}

Semantic roles & 50–950 ramp

primary
#512EA2
secondary
#A6BF6D
accent
#DF49B2
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0D0712
muted
#7D7A81

Preview Lab

Preview with #512EA2

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

Preview Lab → · Contrast checker → · Palette generator →

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