#512278#512278

#512278 is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.6% C 0.141 H 305.5°. Best body text is #FFFFFF at 11.35:1 contrast (WCAG AA passes).

Color values

HEX#512278
RGBrgb(81, 34, 120)
HSLhsl(273, 56%, 30%)
HSVhsv(273, 72%, 47%)
CMYKcmyk(32.5%, 71.7%, 0%, 52.9%)
CIE-LABlab(24.48, 38.58, -40.38)
CIE-LCHlch(24.48, 55.85, 313.70°)
OKLaboklab(36.6% 0.0817 -0.1146)
OKLCHoklch(36.6% 0.141 305.5)
XYZxyz(7.3548, 4.2495, 18.1984)
Luminance0.0425 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512278 #497822
analogous
#262278 #512278 #782274
triadic
#512278 #785122 #227851
tetradic
#512278 #782622 #497822 #227478
square
#512278 #782622 #497822 #227478
split-complementary
#512278 #747822 #227826
monochromatic
#110719 #311448 #512278 #7130A8 #9049CB

Accessibility & contrast

On white

11.35
#512278 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512278
11.35:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512278#FFFFFF#000000##FFFFFF
##5122781.0011.351.8511.35
#FFFFFF11.351.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.351.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00397B
Deuteranopia (green-blind)
#043A76
Tritanopia (blue-blind)
#4A354A
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #512278;
/* rgb */ color: rgb(81, 34, 120);
/* oklch */ color: oklch(36.6% 0.141 305.5);
Tailwind
colors: {
  custom: {
    50: '#8661a0',
    500: '#512278',
    950: '#000000',
  },
}
SCSS
$custom: #512278;
$custom-light: #8661a0;
$custom-dark: #000000;
JSON
{
  "hex": "#512278",
  "rgb": {
    "r": 81,
    "g": 34,
    "b": 120
  },
  "hsl": {
    "h": 272.791,
    "s": 55.844,
    "l": 30.196
  },
  "oklch": {
    "l": 0.36598,
    "c": 0.14078,
    "h": 305.5
  },
  "luminance": 0.04249
}

Semantic roles & 50–950 ramp

primary
#512278
secondary
#76AB4B
accent
#DF498D
background
#F8F5F9
surface
#F0EAF2
border
#CBC6CC
text
#0B050F
muted
#7C797E

Preview Lab

Preview with #512278

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

Preview Lab → · Contrast checker → · Palette generator →

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