#512898#512898

#512898 is a dark, vivid violet. Relative luminance 0.055; OKLCH L 40.1% C 0.170 H 294.0°. Best body text is #FFFFFF at 9.97:1 contrast (WCAG AA passes).

Color values

HEX#512898
RGBrgb(81, 40, 152)
HSLhsl(262, 58%, 38%)
HSVhsv(262, 74%, 60%)
CMYKcmyk(46.7%, 73.7%, 0%, 40.4%)
CIE-LABlab(28.20, 44.07, -54.29)
CIE-LCHlch(28.20, 69.92, 309.07°)
OKLaboklab(40.07% 0.0694 -0.1555)
OKLCHoklch(40.07% 0.17 294)
XYZxyz(9.8181, 5.5336, 30.2505)
Luminance0.0553 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512898 #6F9828
analogous
#283798 #512898 #892898
triadic
#512898 #985128 #289851
tetradic
#512898 #982837 #6F9828 #289889
square
#512898 #982837 #6F9828 #289889
split-complementary
#512898 #988928 #379828
monochromatic
#1D0F37 #371B68 #512898 #6B35C8 #8E64D6

Accessibility & contrast

On white

9.97
#512898 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512898
9.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512898#FFFFFF#000000##FFFFFF
##5128981.009.972.119.97
#FFFFFF9.971.0021.001.00
#0000002.1121.001.0021.00
##FFFFFF9.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00449B
Deuteranopia (green-blind)
#004196
Tritanopia (blue-blind)
#3C455D
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #512898;
/* rgb */ color: rgb(81, 40, 152);
/* oklch */ color: oklch(40.1% 0.170 294.0);
Tailwind
colors: {
  custom: {
    50: '#8966b7',
    500: '#512898',
    950: '#000000',
  },
}
SCSS
$custom: #512898;
$custom-light: #8966b7;
$custom-dark: #000000;
JSON
{
  "hex": "#512898",
  "rgb": {
    "r": 81,
    "g": 40,
    "b": 152
  },
  "hsl": {
    "h": 261.964,
    "s": 58.333,
    "l": 37.647
  },
  "oklch": {
    "l": 0.4007,
    "c": 0.17031,
    "h": 294
  },
  "luminance": 0.05534
}

Semantic roles & 50–950 ramp

primary
#512898
secondary
#9ABC60
accent
#E246A9
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512898

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

Preview Lab → · Contrast checker → · Palette generator →

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