#512DC2#512DC2

#512DC2 is a dark, highly saturated violet. Relative luminance 0.075; OKLCH L 44.6% C 0.214 H 284.8°. Best body text is #FFFFFF at 8.39:1 contrast (WCAG AA passes).

Color values

HEX#512DC2
RGBrgb(81, 45, 194)
HSLhsl(254, 62%, 47%)
HSVhsv(254, 77%, 76%)
CMYKcmyk(58.2%, 76.8%, 0%, 23.9%)
CIE-LABlab(32.96, 53.43, -71.65)
CIE-LCHlch(32.96, 89.38, 306.71°)
OKLaboklab(44.6% 0.0546 -0.2064)
OKLCHoklch(44.6% 0.214 284.8)
XYZxyz(14.0664, 7.5203, 51.7388)
Luminance0.0752 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512DC2 #9EC22D
analogous
#2D53C2 #512DC2 #9C2DC2
triadic
#512DC2 #C2512D #2DC251
tetradic
#512DC2 #C22D53 #9EC22D #2DC29C
square
#512DC2 #C22D53 #9EC22D #2DC29C
split-complementary
#512DC2 #C29C2D #53C22D
monochromatic
#28165F #3C2190 #512DC2 #7455D7 #9D86E3

Accessibility & contrast

On white

8.39
#512DC2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.50
#512DC2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512DC2
8.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512DC2#FFFFFF#000000##FFFFFF
##512DC21.008.392.508.39
#FFFFFF8.391.0021.001.00
#0000002.5021.001.0021.00
##FFFFFF8.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0052C6
Deuteranopia (green-blind)
#0049BF
Tritanopia (blue-blind)
#0F5876
Achromatopsia (no color)
#4E4E4E

Design tokens & code

CSS
--color: #512dc2;
/* rgb */ color: rgb(81, 45, 194);
/* oklch */ color: oklch(44.6% 0.214 284.8);
Tailwind
colors: {
  custom: {
    50: '#8f6bd6',
    500: '#512dc2',
    950: '#000000',
  },
}
SCSS
$custom: #512dc2;
$custom-light: #8f6bd6;
$custom-dark: #000000;
JSON
{
  "hex": "#512dc2",
  "rgb": {
    "r": 81,
    "g": 45,
    "b": 194
  },
  "hsl": {
    "h": 254.497,
    "s": 62.343,
    "l": 46.863
  },
  "oklch": {
    "l": 0.44603,
    "c": 0.21352,
    "h": 284.8
  },
  "luminance": 0.07521
}

Semantic roles & 50–950 ramp

primary
#512DC2
secondary
#BACD7E
accent
#E542BE
background
#F9F6FD
surface
#F2EBFA
border
#CCC6D3
text
#0E0714
muted
#7E7A83

Preview Lab

Preview with #512DC2

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

Preview Lab → · Contrast checker → · Palette generator →

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