#512B82#512B82

#512B82 is a dark, vivid violet. Relative luminance 0.051; OKLCH L 38.6% C 0.140 H 299.9°. Best body text is #FFFFFF at 10.41:1 contrast (WCAG AA passes).

Color values

HEX#512B82
RGBrgb(81, 43, 130)
HSLhsl(266, 50%, 34%)
HSVhsv(266, 67%, 51%)
CMYKcmyk(37.7%, 66.9%, 0%, 49%)
CIE-LABlab(26.99, 36.41, -42.64)
CIE-LCHlch(26.99, 56.07, 310.50°)
OKLaboklab(38.64% 0.0698 -0.1213)
OKLCHoklch(38.64% 0.14 299.9)
XYZxyz(8.2855, 5.0887, 21.6605)
Luminance0.0509 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512B82 #5C822B
analogous
#2B3182 #512B82 #7D2B82
triadic
#512B82 #82512B #2B8251
tetradic
#512B82 #822B31 #5C822B #2B827D
square
#512B82 #822B31 #5C822B #2B827D
split-complementary
#512B82 #827D2B #31822B
monochromatic
#180D26 #341C54 #512B82 #6E3AB0 #8D5ECA

Accessibility & contrast

On white

10.41
#512B82 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.02
#512B82 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512B82
10.41:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512B82#FFFFFF#000000##FFFFFF
##512B821.0010.412.0210.41
#FFFFFF10.411.0021.001.00
#0000002.0221.001.0021.00
##FFFFFF10.411.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004085
Deuteranopia (green-blind)
#003F80
Tritanopia (blue-blind)
#463F52
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #512b82;
/* rgb */ color: rgb(81, 43, 130);
/* oklch */ color: oklch(38.6% 0.140 299.9);
Tailwind
colors: {
  custom: {
    50: '#8667a7',
    500: '#512b82',
    950: '#000000',
  },
}
SCSS
$custom: #512b82;
$custom-light: #8667a7;
$custom-dark: #000000;
JSON
{
  "hex": "#512b82",
  "rgb": {
    "r": 81,
    "g": 43,
    "b": 130
  },
  "hsl": {
    "h": 266.207,
    "s": 50.289,
    "l": 33.922
  },
  "oklch": {
    "l": 0.38639,
    "c": 0.13999,
    "h": 299.9
  },
  "luminance": 0.05089
}

Semantic roles & 50–950 ramp

primary
#512B82
secondary
#8AB059
accent
#DA4E9D
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0B060F
muted
#7C7A7F

Preview Lab

Preview with #512B82

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

Preview Lab → · Contrast checker → · Palette generator →

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