#512097#512097

#512097 is a dark, vivid violet. Relative luminance 0.050; OKLCH L 39.0% C 0.178 H 295.5°. Best body text is #FFFFFF at 10.48:1 contrast (WCAG AA passes).

Color values

HEX#512097
RGBrgb(81, 32, 151)
HSLhsl(265, 65%, 36%)
HSVhsv(265, 79%, 59%)
CMYKcmyk(46.4%, 78.8%, 0%, 40.8%)
CIE-LABlab(26.78, 47.59, -56.00)
CIE-LCHlch(26.78, 73.49, 310.36°)
OKLaboklab(39.04% 0.0767 -0.1605)
OKLCHoklch(39.04% 0.178 295.5)
XYZxyz(9.4943, 5.0165, 29.7402)
Luminance0.0502 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512097 #669720
analogous
#202A97 #512097 #8C2097
triadic
#512097 #975120 #209751
tetradic
#512097 #97202A #669720 #20978C
square
#512097 #97202A #669720 #20978C
split-complementary
#512097 #978C20 #2A9720
monochromatic
#1B0B32 #361564 #512097 #6C2BC9 #8D56DB

Accessibility & contrast

On white

10.48
#512097 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.00
#512097 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512097
10.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512097#FFFFFF#000000##FFFFFF
##5120971.0010.482.0010.48
#FFFFFF10.481.0021.001.00
#0000002.0021.001.0021.00
##FFFFFF10.481.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #512097;
/* rgb */ color: rgb(81, 32, 151);
/* oklch */ color: oklch(39.0% 0.178 295.5);
Tailwind
colors: {
  custom: {
    50: '#8962b7',
    500: '#512097',
    950: '#000000',
  },
}
SCSS
$custom: #512097;
$custom-light: #8962b7;
$custom-dark: #000000;
JSON
{
  "hex": "#512097",
  "rgb": {
    "r": 81,
    "g": 32,
    "b": 151
  },
  "hsl": {
    "h": 264.706,
    "s": 65.027,
    "l": 35.882
  },
  "oklch": {
    "l": 0.39042,
    "c": 0.17789,
    "h": 295.5
  },
  "luminance": 0.05017
}

Semantic roles & 50–950 ramp

primary
#512097
secondary
#93BF54
accent
#E840A3
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0511
muted
#7D7A80

Preview Lab

Preview with #512097

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

Preview Lab → · Contrast checker → · Palette generator →

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