#512F91#512F91

#512F91 is a dark, vivid violet. Relative luminance 0.058; OKLCH L 40.4% C 0.153 H 294.5°. Best body text is #FFFFFF at 9.70:1 contrast (WCAG AA passes).

Color values

HEX#512F91
RGBrgb(81, 47, 145)
HSLhsl(261, 51%, 38%)
HSVhsv(261, 68%, 57%)
CMYKcmyk(44.1%, 67.6%, 0%, 43.1%)
CIE-LABlab(28.97, 38.36, -48.74)
CIE-LCHlch(28.97, 62.03, 308.20°)
OKLaboklab(40.44% 0.0634 -0.1393)
OKLCHoklch(40.44% 0.153 294.5)
XYZxyz(9.5193, 5.8265, 27.4056)
Luminance0.0583 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512F91 #6F912F
analogous
#2F3E91 #512F91 #822F91
triadic
#512F91 #91512F #2F9151
tetradic
#512F91 #912F3E #6F912F #2F9182
square
#512F91 #912F3E #6F912F #2F9182
split-complementary
#512F91 #91822F #3E912F
monochromatic
#1D1135 #372063 #512F91 #6B3EBF #8E6BCF

Accessibility & contrast

On white

9.70
#512F91 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.17
#512F91 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512F91
9.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512F91#FFFFFF#000000##FFFFFF
##512F911.009.702.179.70
#FFFFFF9.701.0021.001.00
#0000002.1721.001.0021.00
##FFFFFF9.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004594
Deuteranopia (green-blind)
#00438F
Tritanopia (blue-blind)
#40465C
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #512f91;
/* rgb */ color: rgb(81, 47, 145);
/* oklch */ color: oklch(40.4% 0.153 294.5);
Tailwind
colors: {
  custom: {
    50: '#876ab2',
    500: '#512f91',
    950: '#000000',
  },
}
SCSS
$custom: #512f91;
$custom-light: #876ab2;
$custom-dark: #000000;
JSON
{
  "hex": "#512f91",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 145
  },
  "hsl": {
    "h": 260.816,
    "s": 51.042,
    "l": 37.647
  },
  "oklch": {
    "l": 0.40435,
    "c": 0.15305,
    "h": 294.5
  },
  "luminance": 0.05827
}

Semantic roles & 50–950 ramp

primary
#512F91
secondary
#9AB665
accent
#DB4DAA
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512F91

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

Preview Lab → · Contrast checker → · Palette generator →

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