#512172#512172

#512172 is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.0% C 0.135 H 308.2°. Best body text is #FFFFFF at 11.60:1 contrast (WCAG AA passes).

Color values

HEX#512172
RGBrgb(81, 33, 114)
HSLhsl(276, 55%, 29%)
HSVhsv(276, 71%, 45%)
CMYKcmyk(28.9%, 71.1%, 0%, 55.3%)
CIE-LABlab(23.84, 37.58, -37.57)
CIE-LCHlch(23.84, 53.14, 315.01°)
OKLaboklab(36% 0.0837 -0.1064)
OKLCHoklch(36% 0.135 308.2)
XYZxyz(6.9738, 4.0521, 16.3311)
Luminance0.0405 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512172 #427221
analogous
#292172 #512172 #72216B
triadic
#512172 #725121 #217251
tetradic
#512172 #722921 #427221 #216B72
square
#512172 #722921 #427221 #216B72
split-complementary
#512172 #6B7221 #217229
monochromatic
#110718 #2F1343 #512172 #732FA1 #9344C9

Accessibility & contrast

On white

11.60
#512172 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#512172 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512172
11.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512172#FFFFFF#000000##FFFFFF
##5121721.0011.601.8111.60
#FFFFFF11.601.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003774
Deuteranopia (green-blind)
#0F3970
Tritanopia (blue-blind)
#4C3346
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #512172;
/* rgb */ color: rgb(81, 33, 114);
/* oklch */ color: oklch(36.0% 0.135 308.2);
Tailwind
colors: {
  custom: {
    50: '#85609b',
    500: '#512172',
    950: '#000000',
  },
}
SCSS
$custom: #512172;
$custom-light: #85609b;
$custom-dark: #000000;
JSON
{
  "hex": "#512172",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 114
  },
  "hsl": {
    "h": 275.556,
    "s": 55.102,
    "l": 28.824
  },
  "oklch": {
    "l": 0.35998,
    "c": 0.13534,
    "h": 308.2
  },
  "luminance": 0.04052
}

Semantic roles & 50–950 ramp

primary
#512172
secondary
#6FA549
accent
#DE4986
background
#F8F5F9
surface
#F0EAF2
border
#CBC6CC
text
#0B050E
muted
#7C797E

Preview Lab

Preview with #512172

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

Preview Lab → · Contrast checker → · Palette generator →

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