#512DC4#512DC4

#512DC4 is a dark, highly saturated violet. Relative luminance 0.076; OKLCH L 44.8% C 0.216 H 284.5°. Best body text is #FFFFFF at 8.33:1 contrast (WCAG AA passes).

Color values

HEX#512DC4
RGBrgb(81, 45, 196)
HSLhsl(254, 63%, 47%)
HSVhsv(254, 77%, 77%)
CMYKcmyk(58.7%, 77%, 0%, 23.1%)
CIE-LABlab(33.16, 53.99, -72.50)
CIE-LCHlch(33.16, 90.40, 306.68°)
OKLaboklab(44.8% 0.054 -0.2089)
OKLCHoklch(44.8% 0.216 284.5)
XYZxyz(14.2925, 7.6107, 52.9297)
Luminance0.0761 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512DC4 #A0C42D
analogous
#2D54C4 #512DC4 #9D2DC4
triadic
#512DC4 #C4512D #2DC451
tetradic
#512DC4 #C42D54 #A0C42D #2DC49D
square
#512DC4 #C42D54 #A0C42D #2DC49D
split-complementary
#512DC4 #C49D2D #54C42D
monochromatic
#281660 #3C2292 #512DC4 #7556D8 #9E88E4

Accessibility & contrast

On white

8.33
#512DC4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.52
#512DC4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512DC4
8.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512DC4#FFFFFF#000000##FFFFFF
##512DC41.008.332.528.33
#FFFFFF8.331.0021.001.00
#0000002.5221.001.0021.00
##FFFFFF8.331.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0052C8
Deuteranopia (green-blind)
#0049C1
Tritanopia (blue-blind)
#095978
Achromatopsia (no color)
#4E4E4E

Design tokens & code

CSS
--color: #512dc4;
/* rgb */ color: rgb(81, 45, 196);
/* oklch */ color: oklch(44.8% 0.216 284.5);
Tailwind
colors: {
  custom: {
    50: '#8f6bd7',
    500: '#512dc4',
    950: '#000000',
  },
}
SCSS
$custom: #512dc4;
$custom-light: #8f6bd7;
$custom-dark: #000000;
JSON
{
  "hex": "#512dc4",
  "rgb": {
    "r": 81,
    "g": 45,
    "b": 196
  },
  "hsl": {
    "h": 254.305,
    "s": 62.656,
    "l": 47.255
  },
  "oklch": {
    "l": 0.44798,
    "c": 0.21579,
    "h": 284.5
  },
  "luminance": 0.07612
}

Semantic roles & 50–950 ramp

primary
#512DC4
secondary
#BBCD80
accent
#E642BF
background
#F9F6FD
surface
#F2EBFA
border
#CCC6D3
text
#0E0715
muted
#7E7A83

Preview Lab

Preview with #512DC4

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

Preview Lab → · Contrast checker → · Palette generator →

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