#512197#512197

#512197 is a dark, vivid violet. Relative luminance 0.051; OKLCH L 39.1% C 0.177 H 295.4°. Best body text is #FFFFFF at 10.43:1 contrast (WCAG AA passes).

Color values

HEX#512197
RGBrgb(81, 33, 151)
HSLhsl(264, 64%, 36%)
HSVhsv(264, 78%, 59%)
CMYKcmyk(46.4%, 78.1%, 0%, 40.8%)
CIE-LABlab(26.94, 47.15, -55.75)
CIE-LCHlch(26.94, 73.01, 310.22°)
OKLaboklab(39.15% 0.0758 -0.1598)
OKLCHoklch(39.15% 0.177 295.4)
XYZxyz(9.5216, 5.0712, 29.7493)
Luminance0.0507 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512197 #679721
analogous
#212C97 #512197 #8C2197
triadic
#512197 #975121 #219751
tetradic
#512197 #97212C #679721 #21978C
square
#512197 #97212C #679721 #21978C
split-complementary
#512197 #978C21 #2C9721
monochromatic
#1B0B33 #361665 #512197 #6C2CC9 #8D58DA

Accessibility & contrast

On white

10.43
#512197 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.01
#512197 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512197
10.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512197#FFFFFF#000000##FFFFFF
##5121971.0010.432.0110.43
#FFFFFF10.431.0021.001.00
#0000002.0121.001.0021.00
##FFFFFF10.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00419A
Deuteranopia (green-blind)
#003E95
Tritanopia (blue-blind)
#3D415B
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #512197;
/* rgb */ color: rgb(81, 33, 151);
/* oklch */ color: oklch(39.1% 0.177 295.4);
Tailwind
colors: {
  custom: {
    50: '#8962b7',
    500: '#512197',
    950: '#000000',
  },
}
SCSS
$custom: #512197;
$custom-light: #8962b7;
$custom-dark: #000000;
JSON
{
  "hex": "#512197",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 151
  },
  "hsl": {
    "h": 264.407,
    "s": 64.13,
    "l": 36.078
  },
  "oklch": {
    "l": 0.3915,
    "c": 0.17687,
    "h": 295.4
  },
  "luminance": 0.05071
}

Semantic roles & 50–950 ramp

primary
#512197
secondary
#94BE55
accent
#E741A3
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0511
muted
#7D7A80

Preview Lab

Preview with #512197

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

Preview Lab → · Contrast checker → · Palette generator →

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