#512894#512894

#512894 is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.7% C 0.166 H 295.1°. Best body text is #FFFFFF at 10.09:1 contrast (WCAG AA passes).

Color values

HEX#512894
RGBrgb(81, 40, 148)
HSLhsl(263, 57%, 37%)
HSVhsv(263, 73%, 58%)
CMYKcmyk(45.3%, 73%, 0%, 42%)
CIE-LABlab(27.86, 42.96, -52.40)
CIE-LCHlch(27.86, 67.76, 309.35°)
OKLaboklab(39.72% 0.0702 -0.15)
OKLCHoklch(39.72% 0.166 295.1)
XYZxyz(9.4960, 5.4048, 28.5541)
Luminance0.0541 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512894 #6B9428
analogous
#283594 #512894 #872894
triadic
#512894 #945128 #289451
tetradic
#512894 #942835 #6B9428 #289487
square
#512894 #942835 #6B9428 #289487
split-complementary
#512894 #948728 #359428
monochromatic
#1C0E34 #371B64 #512894 #6B35C4 #8D62D5

Accessibility & contrast

On white

10.09
#512894 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.08
#512894 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512894
10.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512894#FFFFFF#000000##FFFFFF
##5128941.0010.092.0810.09
#FFFFFF10.091.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.091.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004397
Deuteranopia (green-blind)
#004092
Tritanopia (blue-blind)
#3E445B
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #512894;
/* rgb */ color: rgb(81, 40, 148);
/* oklch */ color: oklch(39.7% 0.166 295.1);
Tailwind
colors: {
  custom: {
    50: '#8866b4',
    500: '#512894',
    950: '#000000',
  },
}
SCSS
$custom: #512894;
$custom-light: #8866b4;
$custom-dark: #000000;
JSON
{
  "hex": "#512894",
  "rgb": {
    "r": 81,
    "g": 40,
    "b": 148
  },
  "hsl": {
    "h": 262.778,
    "s": 57.447,
    "l": 36.863
  },
  "oklch": {
    "l": 0.39718,
    "c": 0.16563,
    "h": 295.1
  },
  "luminance": 0.05405
}

Semantic roles & 50–950 ramp

primary
#512894
secondary
#97BA5E
accent
#E147A6
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512894

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

Preview Lab → · Contrast checker → · Palette generator →

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