#512796#512796

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

Color values

HEX#512796
RGBrgb(81, 39, 150)
HSLhsl(263, 59%, 37%)
HSVhsv(263, 74%, 59%)
CMYKcmyk(46%, 74%, 0%, 41.2%)
CIE-LABlab(27.85, 44.02, -53.64)
CIE-LCHlch(27.85, 69.39, 309.37°)
OKLaboklab(39.77% 0.0708 -0.1536)
OKLCHoklch(39.77% 0.169 294.7)
XYZxyz(9.6224, 5.4021, 29.3840)
Luminance0.0540 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512796 #6C9627
analogous
#273496 #512796 #892796
triadic
#512796 #965127 #279651
tetradic
#512796 #962734 #6C9627 #279689
square
#512796 #962734 #6C9627 #279689
split-complementary
#512796 #968927 #349627
monochromatic
#1D0E35 #371A65 #512796 #6B34C7 #8E61D6

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##512796#FFFFFF#000000##FFFFFF
##5127961.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)
#004399
Deuteranopia (green-blind)
#004094
Tritanopia (blue-blind)
#3D445C
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #512796;
/* rgb */ color: rgb(81, 39, 150);
/* oklch */ color: oklch(39.8% 0.169 294.7);
Tailwind
colors: {
  custom: {
    50: '#8965b6',
    500: '#512796',
    950: '#000000',
  },
}
SCSS
$custom: #512796;
$custom-light: #8965b6;
$custom-dark: #000000;
JSON
{
  "hex": "#512796",
  "rgb": {
    "r": 81,
    "g": 39,
    "b": 150
  },
  "hsl": {
    "h": 262.703,
    "s": 58.73,
    "l": 37.059
  },
  "oklch": {
    "l": 0.39766,
    "c": 0.16915,
    "h": 294.7
  },
  "luminance": 0.05402
}

Semantic roles & 50–950 ramp

primary
#512796
secondary
#98BC5D
accent
#E246A7
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512796

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

Preview Lab → · Contrast checker → · Palette generator →

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