#512178#512178

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

Color values

HEX#512178
RGBrgb(81, 33, 120)
HSLhsl(273, 57%, 30%)
HSVhsv(273, 73%, 47%)
CMYKcmyk(32.5%, 72.5%, 0%, 52.9%)
CIE-LABlab(24.30, 39.09, -40.67)
CIE-LCHlch(24.30, 56.40, 313.87°)
OKLaboklab(36.47% 0.0829 -0.1155)
OKLCHoklch(36.47% 0.142 305.7)
XYZxyz(7.3266, 4.1932, 18.1890)
Luminance0.0419 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512178 #487821
analogous
#252178 #512178 #782174
triadic
#512178 #785121 #217851
tetradic
#512178 #782521 #487821 #217478
square
#512178 #782521 #487821 #217478
split-complementary
#512178 #747821 #217825
monochromatic
#100718 #311448 #512178 #712EA8 #9147CC

Accessibility & contrast

On white

11.42
#512178 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.84
#512178 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512178
11.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512178#FFFFFF#000000##FFFFFF
##5121781.0011.421.8411.42
#FFFFFF11.421.0021.001.00
#0000001.8421.001.0021.00
##FFFFFF11.421.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #512178;
/* rgb */ color: rgb(81, 33, 120);
/* oklch */ color: oklch(36.5% 0.142 305.7);
Tailwind
colors: {
  custom: {
    50: '#8661a0',
    500: '#512178',
    950: '#000000',
  },
}
SCSS
$custom: #512178;
$custom-light: #8661a0;
$custom-dark: #000000;
JSON
{
  "hex": "#512178",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 120
  },
  "hsl": {
    "h": 273.103,
    "s": 56.863,
    "l": 30
  },
  "oklch": {
    "l": 0.3647,
    "c": 0.14213,
    "h": 305.7
  },
  "luminance": 0.04193
}

Semantic roles & 50–950 ramp

primary
#512178
secondary
#75AB4A
accent
#E0488C
background
#F8F5F9
surface
#F0EAF2
border
#CBC6CC
text
#0B050F
muted
#7C797E

Preview Lab

Preview with #512178

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

Preview Lab → · Contrast checker → · Palette generator →

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