#512170#512170

#512170 is a dark, vivid violet. Relative luminance 0.040; OKLCH L 35.8% C 0.133 H 309.1°. Best body text is #FFFFFF at 11.66:1 contrast (WCAG AA passes).

Color values

HEX#512170
RGBrgb(81, 33, 112)
HSLhsl(276, 54%, 28%)
HSVhsv(276, 71%, 44%)
CMYKcmyk(27.7%, 70.5%, 0%, 56.1%)
CIE-LABlab(23.69, 37.09, -36.52)
CIE-LCHlch(23.69, 52.05, 315.44°)
OKLaboklab(35.85% 0.0839 -0.1033)
OKLCHoklch(35.85% 0.133 309.1)
XYZxyz(6.8612, 4.0070, 15.7381)
Luminance0.0401 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512170 #407021
analogous
#292170 #512170 #702167
triadic
#512170 #705121 #217051
tetradic
#512170 #702921 #407021 #216770
square
#512170 #702921 #407021 #216770
split-complementary
#512170 #677021 #217029
monochromatic
#110718 #2F1341 #512170 #732F9F #9444C8

Accessibility & contrast

On white

11.66
#512170 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#512170 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512170
11.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512170#FFFFFF#000000##FFFFFF
##5121701.0011.661.8011.66
#FFFFFF11.661.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003672
Deuteranopia (green-blind)
#13396E
Tritanopia (blue-blind)
#4C3245
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #512170;
/* rgb */ color: rgb(81, 33, 112);
/* oklch */ color: oklch(35.8% 0.133 309.1);
Tailwind
colors: {
  custom: {
    50: '#85609a',
    500: '#512170',
    950: '#000000',
  },
}
SCSS
$custom: #512170;
$custom-light: #85609a;
$custom-dark: #000000;
JSON
{
  "hex": "#512170",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 112
  },
  "hsl": {
    "h": 276.456,
    "s": 54.483,
    "l": 28.431
  },
  "oklch": {
    "l": 0.35845,
    "c": 0.13308,
    "h": 309.1
  },
  "luminance": 0.04007
}

Semantic roles & 50–950 ramp

primary
#512170
secondary
#6DA449
accent
#DE4A84
background
#F8F5F9
surface
#EFEAF2
border
#CAC6CC
text
#0B050E
muted
#7C797E

Preview Lab

Preview with #512170

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

Preview Lab → · Contrast checker → · Palette generator →

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