#512C8A#512C8A

#512C8A is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.4% C 0.148 H 297.1°. Best body text is #FFFFFF at 10.11:1 contrast (WCAG AA passes).

Color values

HEX#512C8A
RGBrgb(81, 44, 138)
HSLhsl(264, 52%, 36%)
HSVhsv(264, 68%, 54%)
CMYKcmyk(41.3%, 68.1%, 0%, 45.9%)
CIE-LABlab(27.81, 38.06, -46.30)
CIE-LCHlch(27.81, 59.94, 309.42°)
OKLaboklab(39.42% 0.0677 -0.1321)
OKLCHoklch(39.42% 0.148 297.1)
XYZxyz(8.8803, 5.3855, 24.6115)
Luminance0.0539 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512C8A #658A2C
analogous
#2C368A #512C8A #802C8A
triadic
#512C8A #8A512C #2C8A51
tetradic
#512C8A #8A2C36 #658A2C #2C8A80
square
#512C8A #8A2C36 #658A2C #2C8A80
split-complementary
#512C8A #8A802C #368A2C
monochromatic
#1B0E2D #361D5C #512C8A #6C3BB8 #8D63CD

Accessibility & contrast

On white

10.11
#512C8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512C8A
10.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512C8A#FFFFFF#000000##FFFFFF
##512C8A1.0010.112.0810.11
#FFFFFF10.111.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00428D
Deuteranopia (green-blind)
#004088
Tritanopia (blue-blind)
#434257
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #512c8a;
/* rgb */ color: rgb(81, 44, 138);
/* oklch */ color: oklch(39.4% 0.148 297.1);
Tailwind
colors: {
  custom: {
    50: '#8768ad',
    500: '#512c8a',
    950: '#000000',
  },
}
SCSS
$custom: #512c8a;
$custom-light: #8768ad;
$custom-dark: #000000;
JSON
{
  "hex": "#512c8a",
  "rgb": {
    "r": 81,
    "g": 44,
    "b": 138
  },
  "hsl": {
    "h": 263.617,
    "s": 51.648,
    "l": 35.686
  },
  "oklch": {
    "l": 0.39424,
    "c": 0.14845,
    "h": 297.1
  },
  "luminance": 0.05386
}

Semantic roles & 50–950 ramp

primary
#512C8A
secondary
#92B45E
accent
#DB4DA3
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512C8A

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

Preview Lab → · Contrast checker → · Palette generator →

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