#512F9D#512F9D

#512F9D is a dark, vivid violet. Relative luminance 0.062; OKLCH L 41.4% C 0.168 H 291.5°. Best body text is #FFFFFF at 9.36:1 contrast (WCAG AA passes).

Color values

HEX#512F9D
RGBrgb(81, 47, 157)
HSLhsl(259, 54%, 40%)
HSVhsv(259, 70%, 62%)
CMYKcmyk(48.4%, 70.1%, 0%, 38.4%)
CIE-LABlab(29.95, 41.80, -54.49)
CIE-LCHlch(29.95, 68.67, 307.49°)
OKLaboklab(41.45% 0.0616 -0.1562)
OKLCHoklch(41.45% 0.168 291.5)
XYZxyz(10.4939, 6.2163, 32.5387)
Luminance0.0622 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512F9D #7B9D2F
analogous
#2F449D #512F9D #882F9D
triadic
#512F9D #9D512F #2F9D51
tetradic
#512F9D #9D2F44 #7B9D2F #2F9D88
square
#512F9D #9D2F44 #7B9D2F #2F9D88
split-complementary
#512F9D #9D882F #449D2F
monochromatic
#20133F #39216E #512F9D #6B43C7 #9072D5

Accessibility & contrast

On white

9.36
#512F9D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.24
#512F9D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512F9D
9.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512F9D#FFFFFF#000000##FFFFFF
##512F9D1.009.362.249.36
#FFFFFF9.361.0021.001.00
#0000002.2421.001.0021.00
##FFFFFF9.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048A0
Deuteranopia (green-blind)
#00449B
Tritanopia (blue-blind)
#394B62
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #512f9d;
/* rgb */ color: rgb(81, 47, 157);
/* oklch */ color: oklch(41.4% 0.168 291.5);
Tailwind
colors: {
  custom: {
    50: '#896abb',
    500: '#512f9d',
    950: '#000000',
  },
}
SCSS
$custom: #512f9d;
$custom-light: #896abb;
$custom-dark: #000000;
JSON
{
  "hex": "#512f9d",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 157
  },
  "hsl": {
    "h": 258.545,
    "s": 53.922,
    "l": 40
  },
  "oklch": {
    "l": 0.41446,
    "c": 0.16786,
    "h": 291.5
  },
  "luminance": 0.06217
}

Semantic roles & 50–950 ramp

primary
#512F9D
secondary
#A3BC6B
accent
#DD4BB0
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0712
muted
#7D7A81

Preview Lab

Preview with #512F9D

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

Preview Lab → · Contrast checker → · Palette generator →

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