#512277#512277

#512277 is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.5% C 0.140 H 305.9°. Best body text is #FFFFFF at 11.38:1 contrast (WCAG AA passes).

Color values

HEX#512277
RGBrgb(81, 34, 119)
HSLhsl(273, 56%, 30%)
HSVhsv(273, 71%, 47%)
CMYKcmyk(31.9%, 71.4%, 0%, 53.3%)
CIE-LABlab(24.40, 38.33, -39.86)
CIE-LCHlch(24.40, 55.30, 313.88°)
OKLaboklab(36.52% 0.0819 -0.1131)
OKLCHoklch(36.52% 0.14 305.9)
XYZxyz(7.2944, 4.2254, 17.8805)
Luminance0.0423 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512277 #487722
analogous
#262277 #512277 #772273
triadic
#512277 #775122 #227751
tetradic
#512277 #772622 #487722 #227377
square
#512277 #772622 #487722 #227377
split-complementary
#512277 #737722 #227726
monochromatic
#100718 #311447 #512277 #7130A7 #9149CB

Accessibility & contrast

On white

11.38
#512277 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.85
#512277 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512277
11.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512277#FFFFFF#000000##FFFFFF
##5122771.0011.381.8511.38
#FFFFFF11.381.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00397A
Deuteranopia (green-blind)
#063A75
Tritanopia (blue-blind)
#4A3549
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #512277;
/* rgb */ color: rgb(81, 34, 119);
/* oklch */ color: oklch(36.5% 0.140 305.9);
Tailwind
colors: {
  custom: {
    50: '#86619f',
    500: '#512277',
    950: '#000000',
  },
}
SCSS
$custom: #512277;
$custom-light: #86619f;
$custom-dark: #000000;
JSON
{
  "hex": "#512277",
  "rgb": {
    "r": 81,
    "g": 34,
    "b": 119
  },
  "hsl": {
    "h": 273.176,
    "s": 55.556,
    "l": 30
  },
  "oklch": {
    "l": 0.36519,
    "c": 0.13964,
    "h": 305.9
  },
  "luminance": 0.04225
}

Semantic roles & 50–950 ramp

primary
#512277
secondary
#75AA4B
accent
#DF498C
background
#F8F5F9
surface
#F0EAF2
border
#CBC6CC
text
#0B050E
muted
#7C797E

Preview Lab

Preview with #512277

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

Preview Lab → · Contrast checker → · Palette generator →

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