#512A7D#512A7D

#512A7D is a dark, vivid violet. Relative luminance 0.049; OKLCH L 38.1% C 0.135 H 301.9°. Best body text is #FFFFFF at 10.62:1 contrast (WCAG AA passes).

Color values

HEX#512A7D
RGBrgb(81, 42, 125)
HSLhsl(268, 50%, 33%)
HSVhsv(268, 66%, 49%)
CMYKcmyk(35.2%, 66.4%, 0%, 51%)
CIE-LABlab(26.41, 35.62, -40.43)
CIE-LCHlch(26.41, 53.88, 311.38°)
OKLaboklab(38.1% 0.0715 -0.1148)
OKLCHoklch(38.1% 0.135 301.9)
XYZxyz(7.9221, 4.8859, 19.9238)
Luminance0.0489 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512A7D #567D2A
analogous
#2A2C7D #512A7D #7B2A7D
triadic
#512A7D #7D512A #2A7D51
tetradic
#512A7D #7D2A2C #567D2A #2A7D7B
square
#512A7D #7D2A2C #567D2A #2A7D7B
split-complementary
#512A7D #7D7B2A #2C7D2A
monochromatic
#160B21 #331B4F #512A7D #6F39AB #8D5AC8

Accessibility & contrast

On white

10.62
#512A7D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.98
#512A7D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512A7D
10.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512A7D#FFFFFF#000000##FFFFFF
##512A7D1.0010.621.9810.62
#FFFFFF10.621.0021.001.00
#0000001.9821.001.0021.00
##FFFFFF10.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E80
Deuteranopia (green-blind)
#0B3E7B
Tritanopia (blue-blind)
#483C4F
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #512a7d;
/* rgb */ color: rgb(81, 42, 125);
/* oklch */ color: oklch(38.1% 0.135 301.9);
Tailwind
colors: {
  custom: {
    50: '#8566a3',
    500: '#512a7d',
    950: '#000000',
  },
}
SCSS
$custom: #512a7d;
$custom-light: #8566a3;
$custom-dark: #000000;
JSON
{
  "hex": "#512a7d",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 125
  },
  "hsl": {
    "h": 268.193,
    "s": 49.701,
    "l": 32.745
  },
  "oklch": {
    "l": 0.38102,
    "c": 0.13528,
    "h": 301.9
  },
  "luminance": 0.04886
}

Semantic roles & 50–950 ramp

primary
#512A7D
secondary
#84AD56
accent
#D94F98
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0B060F
muted
#7C7A7F

Preview Lab

Preview with #512A7D

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

Preview Lab → · Contrast checker → · Palette generator →

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