#512F9E#512F9E

#512F9E is a dark, vivid violet. Relative luminance 0.063; OKLCH L 41.5% C 0.169 H 291.3°. Best body text is #FFFFFF at 9.33:1 contrast (WCAG AA passes).

Color values

HEX#512F9E
RGBrgb(81, 47, 158)
HSLhsl(258, 54%, 40%)
HSVhsv(258, 70%, 62%)
CMYKcmyk(48.7%, 70.3%, 0%, 38%)
CIE-LABlab(30.04, 42.09, -54.96)
CIE-LCHlch(30.04, 69.22, 307.45°)
OKLaboklab(41.53% 0.0614 -0.1575)
OKLCHoklch(41.53% 0.169 291.3)
XYZxyz(10.5797, 6.2506, 32.9902)
Luminance0.0625 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512F9E #7C9E2F
analogous
#2F459E #512F9E #882F9E
triadic
#512F9E #9E512F #2F9E51
tetradic
#512F9E #9E2F45 #7C9E2F #2F9E88
square
#512F9E #9E2F45 #7C9E2F #2F9E88
split-complementary
#512F9E #9E882F #459E2F
monochromatic
#211340 #39216F #512F9E #6C43C7 #9172D5

Accessibility & contrast

On white

9.33
#512F9E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.25
#512F9E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512F9E
9.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512F9E#FFFFFF#000000##FFFFFF
##512F9E1.009.332.259.33
#FFFFFF9.331.0021.001.00
#0000002.2521.001.0021.00
##FFFFFF9.331.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048A1
Deuteranopia (green-blind)
#00449C
Tritanopia (blue-blind)
#384B63
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #512f9e;
/* rgb */ color: rgb(81, 47, 158);
/* oklch */ color: oklch(41.5% 0.169 291.3);
Tailwind
colors: {
  custom: {
    50: '#896abc',
    500: '#512f9e',
    950: '#000000',
  },
}
SCSS
$custom: #512f9e;
$custom-light: #896abc;
$custom-dark: #000000;
JSON
{
  "hex": "#512f9e",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 158
  },
  "hsl": {
    "h": 258.378,
    "s": 54.146,
    "l": 40.196
  },
  "oklch": {
    "l": 0.41532,
    "c": 0.16908,
    "h": 291.3
  },
  "luminance": 0.06251
}

Semantic roles & 50–950 ramp

primary
#512F9E
secondary
#A4BD6C
accent
#DE4AB0
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0712
muted
#7D7A81

Preview Lab

Preview with #512F9E

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

Preview Lab → · Contrast checker → · Palette generator →

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