#512C81#512C81

#512C81 is a dark, vivid violet. Relative luminance 0.051; OKLCH L 38.7% C 0.137 H 300.0°. Best body text is #FFFFFF at 10.36:1 contrast (WCAG AA passes).

Color values

HEX#512C81
RGBrgb(81, 44, 129)
HSLhsl(266, 49%, 34%)
HSVhsv(266, 66%, 51%)
CMYKcmyk(37.2%, 65.9%, 0%, 49.4%)
CIE-LABlab(27.12, 35.58, -41.80)
CIE-LCHlch(27.12, 54.89, 310.40°)
OKLaboklab(38.71% 0.0687 -0.1188)
OKLCHoklch(38.71% 0.137 300)
XYZxyz(8.2555, 5.1356, 21.3210)
Luminance0.0514 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512C81 #5C812C
analogous
#2C3281 #512C81 #7C2C81
triadic
#512C81 #81512C #2C8151
tetradic
#512C81 #812C32 #5C812C #2C817C
square
#512C81 #812C32 #5C812C #2C817C
split-complementary
#512C81 #817C2C #32812C
monochromatic
#180D26 #341C53 #512C81 #6E3CAF #8D5FC8

Accessibility & contrast

On white

10.36
#512C81 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.03
#512C81 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512C81
10.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512C81#FFFFFF#000000##FFFFFF
##512C811.0010.362.0310.36
#FFFFFF10.361.0021.001.00
#0000002.0321.001.0021.00
##FFFFFF10.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004084
Deuteranopia (green-blind)
#063F7F
Tritanopia (blue-blind)
#473F52
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #512c81;
/* rgb */ color: rgb(81, 44, 129);
/* oklch */ color: oklch(38.7% 0.137 300.0);
Tailwind
colors: {
  custom: {
    50: '#8667a6',
    500: '#512c81',
    950: '#000000',
  },
}
SCSS
$custom: #512c81;
$custom-light: #8667a6;
$custom-dark: #000000;
JSON
{
  "hex": "#512c81",
  "rgb": {
    "r": 81,
    "g": 44,
    "b": 129
  },
  "hsl": {
    "h": 266.118,
    "s": 49.133,
    "l": 33.922
  },
  "oklch": {
    "l": 0.3871,
    "c": 0.13728,
    "h": 300
  },
  "luminance": 0.05136
}

Semantic roles & 50–950 ramp

primary
#512C81
secondary
#8AAF5A
accent
#D94F9D
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0B060F
muted
#7C7A7F

Preview Lab

Preview with #512C81

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

Preview Lab → · Contrast checker → · Palette generator →

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