#512F8B#512F8B

#512F8B is a dark, vivid violet. Relative luminance 0.056; OKLCH L 40.0% C 0.146 H 296.2°. Best body text is #FFFFFF at 9.86:1 contrast (WCAG AA passes).

Color values

HEX#512F8B
RGBrgb(81, 47, 139)
HSLhsl(262, 49%, 36%)
HSVhsv(262, 66%, 55%)
CMYKcmyk(41.7%, 66.2%, 0%, 45.5%)
CIE-LABlab(28.50, 36.66, -45.79)
CIE-LCHlch(28.50, 58.66, 308.68°)
OKLaboklab(39.95% 0.0642 -0.1306)
OKLCHoklch(39.95% 0.146 296.2)
XYZxyz(9.0688, 5.6463, 25.0331)
Luminance0.0565 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512F8B #698B2F
analogous
#2F3B8B #512F8B #7F2F8B
triadic
#512F8B #8B512F #2F8B51
tetradic
#512F8B #8B2F3B #698B2F #2F8B7F
square
#512F8B #8B2F3B #698B2F #2F8B7F
split-complementary
#512F8B #8B7F2F #3B8B2F
monochromatic
#1C1030 #36205D #512F8B #6C3EB9 #8D68CC

Accessibility & contrast

On white

9.86
#512F8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.13
#512F8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512F8B
9.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512F8B#FFFFFF#000000##FFFFFF
##512F8B1.009.862.139.86
#FFFFFF9.861.0021.001.00
#0000002.1321.001.0021.00
##FFFFFF9.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00448E
Deuteranopia (green-blind)
#004289
Tritanopia (blue-blind)
#424458
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #512f8b;
/* rgb */ color: rgb(81, 47, 139);
/* oklch */ color: oklch(40.0% 0.146 296.2);
Tailwind
colors: {
  custom: {
    50: '#876aae',
    500: '#512f8b',
    950: '#000000',
  },
}
SCSS
$custom: #512f8b;
$custom-light: #876aae;
$custom-dark: #000000;
JSON
{
  "hex": "#512f8b",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 139
  },
  "hsl": {
    "h": 262.174,
    "s": 49.462,
    "l": 36.471
  },
  "oklch": {
    "l": 0.3995,
    "c": 0.14551,
    "h": 296.2
  },
  "luminance": 0.05646
}

Semantic roles & 50–950 ramp

primary
#512F8B
secondary
#95B363
accent
#D94FA6
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512F8B

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

Preview Lab → · Contrast checker → · Palette generator →

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