#512EB2#512EB2

#512EB2 is a dark, vivid violet. Relative luminance 0.069; OKLCH L 43.2% C 0.194 H 287.4°. Best body text is #FFFFFF at 8.81:1 contrast (WCAG AA passes).

Color values

HEX#512EB2
RGBrgb(81, 46, 178)
HSLhsl(256, 59%, 44%)
HSVhsv(256, 74%, 70%)
CMYKcmyk(54.5%, 74.2%, 0%, 30.2%)
CIE-LABlab(31.62, 48.37, -64.40)
CIE-LCHlch(31.62, 80.54, 306.91°)
OKLaboklab(43.2% 0.058 -0.1852)
OKLCHoklch(43.2% 0.194 287.4)
XYZxyz(12.4038, 6.9170, 42.7924)
Luminance0.0692 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512EB2 #8FB22E
analogous
#2E4DB2 #512EB2 #932EB2
triadic
#512EB2 #B2512E #2EB251
tetradic
#512EB2 #B22E4D #8FB22E #2EB293
square
#512EB2 #B22E4D #8FB22E #2EB293
split-complementary
#512EB2 #B2932E #4DB22E
monochromatic
#251551 #3B2181 #512EB2 #6F4CD1 #977DDD

Accessibility & contrast

On white

8.81
#512EB2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.38
#512EB2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512EB2
8.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512EB2#FFFFFF#000000##FFFFFF
##512EB21.008.812.388.81
#FFFFFF8.811.0021.001.00
#0000002.3821.001.0021.00
##FFFFFF8.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004DB6
Deuteranopia (green-blind)
#0047B0
Tritanopia (blue-blind)
#28526E
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #512eb2;
/* rgb */ color: rgb(81, 46, 178);
/* oklch */ color: oklch(43.2% 0.194 287.4);
Tailwind
colors: {
  custom: {
    50: '#8c6aca',
    500: '#512eb2',
    950: '#000000',
  },
}
SCSS
$custom: #512eb2;
$custom-light: #8c6aca;
$custom-dark: #000000;
JSON
{
  "hex": "#512eb2",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 178
  },
  "hsl": {
    "h": 255.909,
    "s": 58.929,
    "l": 43.922
  },
  "oklch": {
    "l": 0.43198,
    "c": 0.1941,
    "h": 287.4
  },
  "luminance": 0.06918
}

Semantic roles & 50–950 ramp

primary
#512EB2
secondary
#B1C676
accent
#E246B9
background
#F9F6FC
surface
#F1EBF9
border
#CBC6D2
text
#0D0713
muted
#7E7A82

Preview Lab

Preview with #512EB2

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

Preview Lab → · Contrast checker → · Palette generator →

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