#512997#512997

#512997 is a dark, vivid violet. Relative luminance 0.056; OKLCH L 40.1% C 0.168 H 294.1°. Best body text is #FFFFFF at 9.93:1 contrast (WCAG AA passes).

Color values

HEX#512997
RGBrgb(81, 41, 151)
HSLhsl(262, 57%, 38%)
HSVhsv(262, 73%, 59%)
CMYKcmyk(46.4%, 72.8%, 0%, 40.8%)
CIE-LABlab(28.30, 43.28, -53.52)
CIE-LCHlch(28.30, 68.83, 308.96°)
OKLaboklab(40.11% 0.0686 -0.1533)
OKLCHoklch(40.11% 0.168 294.1)
XYZxyz(9.7707, 5.5693, 29.8323)
Luminance0.0557 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512997 #6F9729
analogous
#293897 #512997 #882997
triadic
#512997 #975129 #299751
tetradic
#512997 #972938 #6F9729 #299788
square
#512997 #972938 #6F9729 #299788
split-complementary
#512997 #978829 #389729
monochromatic
#1D0F37 #371C67 #512997 #6B36C7 #8E65D5

Accessibility & contrast

On white

9.93
#512997 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.11
#512997 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512997
9.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512997#FFFFFF#000000##FFFFFF
##5129971.009.932.119.93
#FFFFFF9.931.0021.001.00
#0000002.1121.001.0021.00
##FFFFFF9.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00449A
Deuteranopia (green-blind)
#004195
Tritanopia (blue-blind)
#3D455D
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #512997;
/* rgb */ color: rgb(81, 41, 151);
/* oklch */ color: oklch(40.1% 0.168 294.1);
Tailwind
colors: {
  custom: {
    50: '#8966b6',
    500: '#512997',
    950: '#000000',
  },
}
SCSS
$custom: #512997;
$custom-light: #8966b6;
$custom-dark: #000000;
JSON
{
  "hex": "#512997",
  "rgb": {
    "r": 81,
    "g": 41,
    "b": 151
  },
  "hsl": {
    "h": 261.818,
    "s": 57.292,
    "l": 37.647
  },
  "oklch": {
    "l": 0.4011,
    "c": 0.16796,
    "h": 294.1
  },
  "luminance": 0.0557
}

Semantic roles & 50–950 ramp

primary
#512997
secondary
#9ABB61
accent
#E147A9
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512997

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

Preview Lab → · Contrast checker → · Palette generator →

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