#512797#512797

#512797 is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.9% C 0.170 H 294.5°. Best body text is #FFFFFF at 10.06:1 contrast (WCAG AA passes).

Color values

HEX#512797
RGBrgb(81, 39, 151)
HSLhsl(263, 59%, 37%)
HSVhsv(263, 74%, 59%)
CMYKcmyk(46.4%, 74.2%, 0%, 40.8%)
CIE-LABlab(27.94, 44.30, -54.11)
CIE-LCHlch(27.94, 69.93, 309.30°)
OKLaboklab(39.86% 0.0705 -0.155)
OKLCHoklch(39.86% 0.17 294.5)
XYZxyz(9.7033, 5.4345, 29.8099)
Luminance0.0544 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512797 #6D9727
analogous
#273597 #512797 #892797
triadic
#512797 #975127 #279751
tetradic
#512797 #972735 #6D9727 #279789
square
#512797 #972735 #6D9727 #279789
split-complementary
#512797 #978927 #359727
monochromatic
#1D0E36 #371A66 #512797 #6B34C8 #8E62D6

Accessibility & contrast

On white

10.06
#512797 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#512797 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512797
10.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512797#FFFFFF#000000##FFFFFF
##5127971.0010.062.0910.06
#FFFFFF10.061.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.061.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #512797;
/* rgb */ color: rgb(81, 39, 151);
/* oklch */ color: oklch(39.9% 0.170 294.5);
Tailwind
colors: {
  custom: {
    50: '#8965b7',
    500: '#512797',
    950: '#000000',
  },
}
SCSS
$custom: #512797;
$custom-light: #8965b7;
$custom-dark: #000000;
JSON
{
  "hex": "#512797",
  "rgb": {
    "r": 81,
    "g": 39,
    "b": 151
  },
  "hsl": {
    "h": 262.5,
    "s": 58.947,
    "l": 37.255
  },
  "oklch": {
    "l": 0.39855,
    "c": 0.17031,
    "h": 294.5
  },
  "luminance": 0.05435
}

Semantic roles & 50–950 ramp

primary
#512797
secondary
#99BC5E
accent
#E246A7
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512797

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

Preview Lab → · Contrast checker → · Palette generator →

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