#512897#512897

#512897 is a dark, vivid violet. Relative luminance 0.055; OKLCH L 40.0% C 0.169 H 294.3°. Best body text is #FFFFFF at 10.00:1 contrast (WCAG AA passes).

Color values

HEX#512897
RGBrgb(81, 40, 151)
HSLhsl(262, 58%, 37%)
HSVhsv(262, 74%, 59%)
CMYKcmyk(46.4%, 73.5%, 0%, 40.8%)
CIE-LABlab(28.12, 43.79, -53.82)
CIE-LCHlch(28.12, 69.38, 309.13°)
OKLaboklab(39.98% 0.0696 -0.1542)
OKLCHoklch(39.98% 0.169 294.3)
XYZxyz(9.7365, 5.5010, 29.8210)
Luminance0.0550 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512897 #6E9728
analogous
#283797 #512897 #882897
triadic
#512897 #975128 #289751
tetradic
#512897 #972837 #6E9728 #289788
square
#512897 #972837 #6E9728 #289788
split-complementary
#512897 #978828 #379728
monochromatic
#1D0E36 #371B67 #512897 #6B35C7 #8E64D6

Accessibility & contrast

On white

10.00
#512897 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.10
#512897 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512897
10.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512897#FFFFFF#000000##FFFFFF
##5128971.0010.002.1010.00
#FFFFFF10.001.0021.001.00
#0000002.1021.001.0021.00
##FFFFFF10.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00439A
Deuteranopia (green-blind)
#004095
Tritanopia (blue-blind)
#3D455D
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #512897;
/* rgb */ color: rgb(81, 40, 151);
/* oklch */ color: oklch(40.0% 0.169 294.3);
Tailwind
colors: {
  custom: {
    50: '#8966b6',
    500: '#512897',
    950: '#000000',
  },
}
SCSS
$custom: #512897;
$custom-light: #8966b6;
$custom-dark: #000000;
JSON
{
  "hex": "#512897",
  "rgb": {
    "r": 81,
    "g": 40,
    "b": 151
  },
  "hsl": {
    "h": 262.162,
    "s": 58.115,
    "l": 37.451
  },
  "oklch": {
    "l": 0.39981,
    "c": 0.16915,
    "h": 294.3
  },
  "luminance": 0.05501
}

Semantic roles & 50–950 ramp

primary
#512897
secondary
#99BC5F
accent
#E146A8
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512897

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

Preview Lab → · Contrast checker → · Palette generator →

#512897 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva