#512F8F#512F8F

#512F8F is a dark, vivid violet. Relative luminance 0.058; OKLCH L 40.3% C 0.151 H 295.0°. Best body text is #FFFFFF at 9.75:1 contrast (WCAG AA passes).

Color values

HEX#512F8F
RGBrgb(81, 47, 143)
HSLhsl(261, 51%, 37%)
HSVhsv(261, 67%, 56%)
CMYKcmyk(43.4%, 67.1%, 0%, 43.9%)
CIE-LABlab(28.81, 37.79, -47.77)
CIE-LCHlch(28.81, 60.91, 308.35°)
OKLaboklab(40.27% 0.0637 -0.1364)
OKLCHoklch(40.27% 0.151 295)
XYZxyz(9.3665, 5.7653, 26.6006)
Luminance0.0577 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512F8F #6D8F2F
analogous
#2F3D8F #512F8F #812F8F
triadic
#512F8F #8F512F #2F8F51
tetradic
#512F8F #8F2F3D #6D8F2F #2F8F81
square
#512F8F #8F2F3D #6D8F2F #2F8F81
split-complementary
#512F8F #8F812F #3D8F2F
monochromatic
#1D1133 #372061 #512F8F #6B3EBD #8E6ACE

Accessibility & contrast

On white

9.75
#512F8F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.15
#512F8F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512F8F
9.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512F8F#FFFFFF#000000##FFFFFF
##512F8F1.009.752.159.75
#FFFFFF9.751.0021.001.00
#0000002.1521.001.0021.00
##FFFFFF9.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004592
Deuteranopia (green-blind)
#00428D
Tritanopia (blue-blind)
#40465B
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #512f8f;
/* rgb */ color: rgb(81, 47, 143);
/* oklch */ color: oklch(40.3% 0.151 295.0);
Tailwind
colors: {
  custom: {
    50: '#876ab0',
    500: '#512f8f',
    950: '#000000',
  },
}
SCSS
$custom: #512f8f;
$custom-light: #876ab0;
$custom-dark: #000000;
JSON
{
  "hex": "#512f8f",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 143
  },
  "hsl": {
    "h": 261.25,
    "s": 50.526,
    "l": 37.255
  },
  "oklch": {
    "l": 0.40272,
    "c": 0.15055,
    "h": 295
  },
  "luminance": 0.05766
}

Semantic roles & 50–950 ramp

primary
#512F8F
secondary
#99B565
accent
#DA4EA8
background
#F8F6FA
surface
#F0EBF5
border
#CBC6CF
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512F8F

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

Preview Lab → · Contrast checker → · Palette generator →

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