#512C98#512C98

#512C98 is a dark, vivid violet. Relative luminance 0.058; OKLCH L 40.6% C 0.166 H 293.3°. Best body text is #FFFFFF at 9.71:1 contrast (WCAG AA passes).

Color values

HEX#512C98
RGBrgb(81, 44, 152)
HSLhsl(261, 55%, 38%)
HSVhsv(261, 71%, 60%)
CMYKcmyk(46.7%, 71.1%, 0%, 40.4%)
CIE-LABlab(28.95, 41.99, -53.08)
CIE-LCHlch(28.95, 67.68, 308.35°)
OKLaboklab(40.6% 0.0655 -0.152)
OKLCHoklch(40.6% 0.166 293.3)
XYZxyz(9.9600, 5.8174, 30.2978)
Luminance0.0582 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512C98 #73982C
analogous
#2C3D98 #512C98 #872C98
triadic
#512C98 #98512C #2C9851
tetradic
#512C98 #982C3D #73982C #2C9887
square
#512C98 #982C3D #73982C #2C9887
split-complementary
#512C98 #98872C #3D982C
monochromatic
#1E1139 #381E69 #512C98 #6B3BC6 #8F6AD4

Accessibility & contrast

On white

9.71
#512C98 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.16
#512C98 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512C98
9.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512C98#FFFFFF#000000##FFFFFF
##512C981.009.712.169.71
#FFFFFF9.711.0021.001.00
#0000002.1621.001.0021.00
##FFFFFF9.711.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00469B
Deuteranopia (green-blind)
#004296
Tritanopia (blue-blind)
#3C475F
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #512c98;
/* rgb */ color: rgb(81, 44, 152);
/* oklch */ color: oklch(40.6% 0.166 293.3);
Tailwind
colors: {
  custom: {
    50: '#8968b7',
    500: '#512c98',
    950: '#000000',
  },
}
SCSS
$custom: #512c98;
$custom-light: #8968b7;
$custom-dark: #000000;
JSON
{
  "hex": "#512c98",
  "rgb": {
    "r": 81,
    "g": 44,
    "b": 152
  },
  "hsl": {
    "h": 260.556,
    "s": 55.102,
    "l": 38.431
  },
  "oklch": {
    "l": 0.40598,
    "c": 0.16551,
    "h": 293.3
  },
  "luminance": 0.05818
}

Semantic roles & 50–950 ramp

primary
#512C98
secondary
#9DBB65
accent
#DE49AB
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512C98

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

Preview Lab → · Contrast checker → · Palette generator →

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