#512A91#512A91

#512A91 is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.7% C 0.160 H 295.5°. Best body text is #FFFFFF at 10.05:1 contrast (WCAG AA passes).

Color values

HEX#512A91
RGBrgb(81, 42, 145)
HSLhsl(263, 55%, 37%)
HSVhsv(263, 71%, 57%)
CMYKcmyk(44.1%, 71%, 0%, 43.1%)
CIE-LABlab(27.98, 41.09, -50.35)
CIE-LCHlch(27.98, 64.99, 309.22°)
OKLaboklab(39.73% 0.0688 -0.144)
OKLCHoklch(39.73% 0.16 295.5)
XYZxyz(9.3308, 5.4494, 27.3428)
Luminance0.0545 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512A91 #6A912A
analogous
#2A3791 #512A91 #852A91
triadic
#512A91 #91512A #2A9151
tetradic
#512A91 #912A37 #6A912A #2A9185
square
#512A91 #912A37 #6A912A #2A9185
split-complementary
#512A91 #91852A #37912A
monochromatic
#1C0F32 #361C62 #512A91 #6C38C0 #8D63D2

Accessibility & contrast

On white

10.05
#512A91 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#512A91 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512A91
10.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512A91#FFFFFF#000000##FFFFFF
##512A911.0010.052.0910.05
#FFFFFF10.051.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004394
Deuteranopia (green-blind)
#00408F
Tritanopia (blue-blind)
#40435A
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #512a91;
/* rgb */ color: rgb(81, 42, 145);
/* oklch */ color: oklch(39.7% 0.160 295.5);
Tailwind
colors: {
  custom: {
    50: '#8867b2',
    500: '#512a91',
    950: '#000000',
  },
}
SCSS
$custom: #512a91;
$custom-light: #8867b2;
$custom-dark: #000000;
JSON
{
  "hex": "#512a91",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 145
  },
  "hsl": {
    "h": 262.718,
    "s": 55.08,
    "l": 36.667
  },
  "oklch": {
    "l": 0.39725,
    "c": 0.1596,
    "h": 295.5
  },
  "luminance": 0.0545
}

Semantic roles & 50–950 ramp

primary
#512A91
secondary
#96B85F
accent
#DE49A6
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512A91

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

Preview Lab → · Contrast checker → · Palette generator →

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