#512C8B#512C8B

#512C8B is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.5% C 0.150 H 296.8°. Best body text is #FFFFFF at 10.08:1 contrast (WCAG AA passes).

Color values

HEX#512C8B
RGBrgb(81, 44, 139)
HSLhsl(263, 52%, 36%)
HSVhsv(263, 68%, 55%)
CMYKcmyk(41.7%, 68.3%, 0%, 45.5%)
CIE-LABlab(27.88, 38.34, -46.80)
CIE-LCHlch(27.88, 60.50, 309.33°)
OKLaboklab(39.51% 0.0676 -0.1335)
OKLCHoklch(39.51% 0.15 296.8)
XYZxyz(8.9530, 5.4146, 24.9945)
Luminance0.0541 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512C8B #668B2C
analogous
#2C368B #512C8B #802C8B
triadic
#512C8B #8B512C #2C8B51
tetradic
#512C8B #8B2C36 #668B2C #2C8B80
square
#512C8B #8B2C36 #668B2C #2C8B80
split-complementary
#512C8B #8B802C #368B2C
monochromatic
#1B0F2E #361D5D #512C8B #6C3BB9 #8D64CE

Accessibility & contrast

On white

10.08
#512C8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.08
#512C8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512C8B
10.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512C8B#FFFFFF#000000##FFFFFF
##512C8B1.0010.082.0810.08
#FFFFFF10.081.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00428E
Deuteranopia (green-blind)
#004189
Tritanopia (blue-blind)
#424257
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #512c8b;
/* rgb */ color: rgb(81, 44, 139);
/* oklch */ color: oklch(39.5% 0.150 296.8);
Tailwind
colors: {
  custom: {
    50: '#8768ae',
    500: '#512c8b',
    950: '#000000',
  },
}
SCSS
$custom: #512c8b;
$custom-light: #8768ae;
$custom-dark: #000000;
JSON
{
  "hex": "#512c8b",
  "rgb": {
    "r": 81,
    "g": 44,
    "b": 139
  },
  "hsl": {
    "h": 263.368,
    "s": 51.913,
    "l": 35.882
  },
  "oklch": {
    "l": 0.39505,
    "c": 0.14968,
    "h": 296.8
  },
  "luminance": 0.05415
}

Semantic roles & 50–950 ramp

primary
#512C8B
secondary
#93B45F
accent
#DB4CA4
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512C8B

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

Preview Lab → · Contrast checker → · Palette generator →

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