#512398#512398

#512398 is a dark, vivid violet. Relative luminance 0.052; OKLCH L 39.5% C 0.176 H 294.8°. Best body text is #FFFFFF at 10.28:1 contrast (WCAG AA passes).

Color values

HEX#512398
RGBrgb(81, 35, 152)
HSLhsl(264, 63%, 37%)
HSVhsv(264, 77%, 60%)
CMYKcmyk(46.7%, 77%, 0%, 40.4%)
CIE-LABlab(27.35, 46.50, -55.69)
CIE-LCHlch(27.35, 72.55, 309.86°)
OKLaboklab(39.47% 0.0739 -0.1596)
OKLCHoklch(39.47% 0.176 294.8)
XYZxyz(9.6603, 5.2181, 30.1979)
Luminance0.0522 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512398 #6A9823
analogous
#232F98 #512398 #8C2398
triadic
#512398 #985123 #239851
tetradic
#512398 #98232F #6A9823 #23988C
square
#512398 #98232F #6A9823 #23988C
split-complementary
#512398 #988C23 #2F9823
monochromatic
#1C0C35 #361866 #512398 #6C2ECA #8D5CD9

Accessibility & contrast

On white

10.28
#512398 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.04
#512398 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512398
10.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512398#FFFFFF#000000##FFFFFF
##5123981.0010.282.0410.28
#FFFFFF10.281.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00429B
Deuteranopia (green-blind)
#003F96
Tritanopia (blue-blind)
#3C435C
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #512398;
/* rgb */ color: rgb(81, 35, 152);
/* oklch */ color: oklch(39.5% 0.176 294.8);
Tailwind
colors: {
  custom: {
    50: '#8963b7',
    500: '#512398',
    950: '#000000',
  },
}
SCSS
$custom: #512398;
$custom-light: #8963b7;
$custom-dark: #000000;
JSON
{
  "hex": "#512398",
  "rgb": {
    "r": 81,
    "g": 35,
    "b": 152
  },
  "hsl": {
    "h": 263.59,
    "s": 62.567,
    "l": 36.667
  },
  "oklch": {
    "l": 0.39466,
    "c": 0.17589,
    "h": 294.8
  },
  "luminance": 0.05218
}

Semantic roles & 50–950 ramp

primary
#512398
secondary
#96BE59
accent
#E642A5
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512398

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

Preview Lab → · Contrast checker → · Palette generator →

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