#512271#512271

#512271 is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.1% C 0.133 H 308.5°. Best body text is #FFFFFF at 11.56:1 contrast (WCAG AA passes).

Color values

HEX#512271
RGBrgb(81, 34, 113)
HSLhsl(276, 54%, 29%)
HSVhsv(276, 70%, 44%)
CMYKcmyk(28.3%, 69.9%, 0%, 55.7%)
CIE-LABlab(23.95, 36.83, -36.75)
CIE-LCHlch(23.95, 52.02, 315.06°)
OKLaboklab(36.05% 0.0826 -0.104)
OKLCHoklch(36.05% 0.133 308.5)
XYZxyz(6.9454, 4.0858, 16.0423)
Luminance0.0409 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512271 #427122
analogous
#2A2271 #512271 #71226A
triadic
#512271 #715122 #227151
tetradic
#512271 #712A22 #427122 #226A71
square
#512271 #712A22 #427122 #226A71
split-complementary
#512271 #6A7122 #22712A
monochromatic
#110718 #2F1442 #512271 #7330A0 #9346C7

Accessibility & contrast

On white

11.56
#512271 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.82
#512271 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512271
11.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512271#FFFFFF#000000##FFFFFF
##5122711.0011.561.8211.56
#FFFFFF11.561.0021.001.00
#0000001.8221.001.0021.00
##FFFFFF11.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003773
Deuteranopia (green-blind)
#133A6F
Tritanopia (blue-blind)
#4C3346
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #512271;
/* rgb */ color: rgb(81, 34, 113);
/* oklch */ color: oklch(36.1% 0.133 308.5);
Tailwind
colors: {
  custom: {
    50: '#85619a',
    500: '#512271',
    950: '#000000',
  },
}
SCSS
$custom: #512271;
$custom-light: #85619a;
$custom-dark: #000000;
JSON
{
  "hex": "#512271",
  "rgb": {
    "r": 81,
    "g": 34,
    "b": 113
  },
  "hsl": {
    "h": 275.696,
    "s": 53.741,
    "l": 28.824
  },
  "oklch": {
    "l": 0.36054,
    "c": 0.13277,
    "h": 308.5
  },
  "luminance": 0.04086
}

Semantic roles & 50–950 ramp

primary
#512271
secondary
#6FA44A
accent
#DD4B86
background
#F8F5F9
surface
#EFEAF2
border
#CAC6CC
text
#0B050E
muted
#7C797E

Preview Lab

Preview with #512271

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

Preview Lab → · Contrast checker → · Palette generator →

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