#512798#512798

#512798 is a dark, vivid violet. Relative luminance 0.055; OKLCH L 39.9% C 0.171 H 294.2°. Best body text is #FFFFFF at 10.03:1 contrast (WCAG AA passes).

Color values

HEX#512798
RGBrgb(81, 39, 152)
HSLhsl(262, 59%, 37%)
HSVhsv(262, 74%, 60%)
CMYKcmyk(46.7%, 74.3%, 0%, 40.4%)
CIE-LABlab(28.03, 44.57, -54.58)
CIE-LCHlch(28.03, 70.47, 309.23°)
OKLaboklab(39.94% 0.0703 -0.1564)
OKLCHoklch(39.94% 0.171 294.2)
XYZxyz(9.7848, 5.4671, 30.2394)
Luminance0.0547 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512798 #6E9827
analogous
#273698 #512798 #8A2798
triadic
#512798 #985127 #279851
tetradic
#512798 #982736 #6E9827 #27988A
square
#512798 #982736 #6E9827 #27988A
split-complementary
#512798 #988A27 #369827
monochromatic
#1D0E37 #371B67 #512798 #6B33C9 #8E63D7

Accessibility & contrast

On white

10.03
#512798 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#512798 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512798
10.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512798#FFFFFF#000000##FFFFFF
##5127981.0010.032.0910.03
#FFFFFF10.031.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00439B
Deuteranopia (green-blind)
#004096
Tritanopia (blue-blind)
#3C455D
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #512798;
/* rgb */ color: rgb(81, 39, 152);
/* oklch */ color: oklch(39.9% 0.171 294.2);
Tailwind
colors: {
  custom: {
    50: '#8965b7',
    500: '#512798',
    950: '#000000',
  },
}
SCSS
$custom: #512798;
$custom-light: #8965b7;
$custom-dark: #000000;
JSON
{
  "hex": "#512798",
  "rgb": {
    "r": 81,
    "g": 39,
    "b": 152
  },
  "hsl": {
    "h": 262.301,
    "s": 59.162,
    "l": 37.451
  },
  "oklch": {
    "l": 0.39944,
    "c": 0.17147,
    "h": 294.2
  },
  "luminance": 0.05467
}

Semantic roles & 50–950 ramp

primary
#512798
secondary
#99BC5E
accent
#E245A8
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512798

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

Preview Lab → · Contrast checker → · Palette generator →

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