#512098#512098

#512098 is a dark, vivid violet. Relative luminance 0.050; OKLCH L 39.1% C 0.179 H 295.3°. Best body text is #FFFFFF at 10.45:1 contrast (WCAG AA passes).

Color values

HEX#512098
RGBrgb(81, 32, 152)
HSLhsl(265, 65%, 36%)
HSVhsv(265, 79%, 60%)
CMYKcmyk(46.7%, 78.9%, 0%, 40.4%)
CIE-LABlab(26.87, 47.85, -56.47)
CIE-LCHlch(26.87, 74.02, 310.28°)
OKLaboklab(39.14% 0.0764 -0.1619)
OKLCHoklch(39.14% 0.179 295.3)
XYZxyz(9.5758, 5.0491, 30.1697)
Luminance0.0505 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512098 #679820
analogous
#202B98 #512098 #8D2098
triadic
#512098 #985120 #209851
tetradic
#512098 #98202B #679820 #20988D
square
#512098 #98202B #679820 #20988D
split-complementary
#512098 #988D20 #2B9820
monochromatic
#1B0B33 #361565 #512098 #6C2BCB #8D57DC

Accessibility & contrast

On white

10.45
#512098 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.01
#512098 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512098
10.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512098#FFFFFF#000000##FFFFFF
##5120981.0010.452.0110.45
#FFFFFF10.451.0021.001.00
#0000002.0121.001.0021.00
##FFFFFF10.451.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00409B
Deuteranopia (green-blind)
#003E96
Tritanopia (blue-blind)
#3D415B
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #512098;
/* rgb */ color: rgb(81, 32, 152);
/* oklch */ color: oklch(39.1% 0.179 295.3);
Tailwind
colors: {
  custom: {
    50: '#8962b7',
    500: '#512098',
    950: '#000000',
  },
}
SCSS
$custom: #512098;
$custom-light: #8962b7;
$custom-dark: #000000;
JSON
{
  "hex": "#512098",
  "rgb": {
    "r": 81,
    "g": 32,
    "b": 152
  },
  "hsl": {
    "h": 264.5,
    "s": 65.217,
    "l": 36.078
  },
  "oklch": {
    "l": 0.39135,
    "c": 0.17899,
    "h": 295.3
  },
  "luminance": 0.05049
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #512098

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

Preview Lab → · Contrast checker → · Palette generator →

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