#512D80#512D80

#512D80 is a dark, vivid violet. Relative luminance 0.052; OKLCH L 38.8% C 0.135 H 300.1°. Best body text is #FFFFFF at 10.31:1 contrast (WCAG AA passes).

Color values

HEX#512D80
RGBrgb(81, 45, 128)
HSLhsl(266, 48%, 34%)
HSVhsv(266, 65%, 50%)
CMYKcmyk(36.7%, 64.8%, 0%, 49.8%)
CIE-LABlab(27.25, 34.74, -40.95)
CIE-LCHlch(27.25, 53.70, 310.31°)
OKLaboklab(38.79% 0.0676 -0.1164)
OKLCHoklch(38.79% 0.135 300.1)
XYZxyz(8.2271, 5.1846, 20.9852)
Luminance0.0519 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512D80 #5C802D
analogous
#2D3380 #512D80 #7B2D80
triadic
#512D80 #80512D #2D8051
tetradic
#512D80 #802D33 #5C802D #2D807B
square
#512D80 #802D33 #5C802D #2D807B
split-complementary
#512D80 #807B2D #33802D
monochromatic
#180D25 #341D53 #512D80 #6E3DAD #8D60C7

Accessibility & contrast

On white

10.31
#512D80 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.04
#512D80 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512D80
10.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512D80#FFFFFF#000000##FFFFFF
##512D801.0010.312.0410.31
#FFFFFF10.311.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004083
Deuteranopia (green-blind)
#0C407E
Tritanopia (blue-blind)
#473F52
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #512d80;
/* rgb */ color: rgb(81, 45, 128);
/* oklch */ color: oklch(38.8% 0.135 300.1);
Tailwind
colors: {
  custom: {
    50: '#8668a5',
    500: '#512d80',
    950: '#000000',
  },
}
SCSS
$custom: #512d80;
$custom-light: #8668a5;
$custom-dark: #000000;
JSON
{
  "hex": "#512d80",
  "rgb": {
    "r": 81,
    "g": 45,
    "b": 128
  },
  "hsl": {
    "h": 266.024,
    "s": 47.977,
    "l": 33.922
  },
  "oklch": {
    "l": 0.38786,
    "c": 0.13455,
    "h": 300.1
  },
  "luminance": 0.05185
}

Semantic roles & 50–950 ramp

primary
#512D80
secondary
#8AAE5B
accent
#D8509D
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0B060F
muted
#7C7A7F

Preview Lab

Preview with #512D80

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

Preview Lab → · Contrast checker → · Palette generator →

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