#512B9F#512B9F

#512B9F is a dark, vivid violet. Relative luminance 0.060; OKLCH L 41.1% C 0.175 H 291.8°. Best body text is #FFFFFF at 9.56:1 contrast (WCAG AA passes).

Color values

HEX#512B9F
RGBrgb(81, 43, 159)
HSLhsl(260, 57%, 40%)
HSVhsv(260, 73%, 62%)
CMYKcmyk(49.1%, 73%, 0%, 37.6%)
CIE-LABlab(29.36, 44.49, -56.67)
CIE-LCHlch(29.36, 72.05, 308.14°)
OKLaboklab(41.08% 0.065 -0.1625)
OKLCHoklch(41.08% 0.175 291.8)
XYZxyz(10.5135, 5.9799, 33.3945)
Luminance0.0598 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512B9F #799F2B
analogous
#2B3F9F #512B9F #8B2B9F
triadic
#512B9F #9F512B #2B9F51
tetradic
#512B9F #9F2B3F #799F2B #2B9F8B
square
#512B9F #9F2B3F #799F2B #2B9F8B
split-complementary
#512B9F #9F8B2B #3F9F2B
monochromatic
#20113F #381E6F #512B9F #6B3DCA #906DD7

Accessibility & contrast

On white

9.56
#512B9F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.20
#512B9F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512B9F
9.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512B9F#FFFFFF#000000##FFFFFF
##512B9F1.009.562.209.56
#FFFFFF9.561.0021.001.00
#0000002.2021.001.0021.00
##FFFFFF9.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047A2
Deuteranopia (green-blind)
#00439D
Tritanopia (blue-blind)
#384962
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #512b9f;
/* rgb */ color: rgb(81, 43, 159);
/* oklch */ color: oklch(41.1% 0.175 291.8);
Tailwind
colors: {
  custom: {
    50: '#8a68bc',
    500: '#512b9f',
    950: '#000000',
  },
}
SCSS
$custom: #512b9f;
$custom-light: #8a68bc;
$custom-dark: #000000;
JSON
{
  "hex": "#512b9f",
  "rgb": {
    "r": 81,
    "g": 43,
    "b": 159
  },
  "hsl": {
    "h": 259.655,
    "s": 57.426,
    "l": 39.608
  },
  "oklch": {
    "l": 0.41079,
    "c": 0.17506,
    "h": 291.8
  },
  "luminance": 0.0598
}

Semantic roles & 50–950 ramp

primary
#512B9F
secondary
#A2BE67
accent
#E147AE
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #512B9F

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

Preview Lab → · Contrast checker → · Palette generator →

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