#512498#512498

#512498 is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.6% C 0.175 H 294.7°. Best body text is #FFFFFF at 10.22:1 contrast (WCAG AA passes).

Color values

HEX#512498
RGBrgb(81, 36, 152)
HSLhsl(263, 62%, 37%)
HSVhsv(263, 76%, 60%)
CMYKcmyk(46.7%, 76.3%, 0%, 40.4%)
CIE-LABlab(27.51, 46.03, -55.42)
CIE-LCHlch(27.51, 72.04, 309.71°)
OKLaboklab(39.58% 0.073 -0.1588)
OKLCHoklch(39.58% 0.175 294.7)
XYZxyz(9.6902, 5.2778, 30.2078)
Luminance0.0528 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512498 #6B9824
analogous
#243198 #512498 #8B2498
triadic
#512498 #985124 #249851
tetradic
#512498 #982431 #6B9824 #24988B
square
#512498 #982431 #6B9824 #24988B
split-complementary
#512498 #988B24 #319824
monochromatic
#1C0D35 #371867 #512498 #6B30C9 #8D5ED9

Accessibility & contrast

On white

10.22
#512498 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.06
#512498 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512498
10.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512498#FFFFFF#000000##FFFFFF
##5124981.0010.222.0610.22
#FFFFFF10.221.0021.001.00
#0000002.0621.001.0021.00
##FFFFFF10.221.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: #512498;
/* rgb */ color: rgb(81, 36, 152);
/* oklch */ color: oklch(39.6% 0.175 294.7);
Tailwind
colors: {
  custom: {
    50: '#8964b7',
    500: '#512498',
    950: '#000000',
  },
}
SCSS
$custom: #512498;
$custom-light: #8964b7;
$custom-dark: #000000;
JSON
{
  "hex": "#512498",
  "rgb": {
    "r": 81,
    "g": 36,
    "b": 152
  },
  "hsl": {
    "h": 263.276,
    "s": 61.702,
    "l": 36.863
  },
  "oklch": {
    "l": 0.39582,
    "c": 0.17481,
    "h": 294.7
  },
  "luminance": 0.05278
}

Semantic roles & 50–950 ramp

primary
#512498
secondary
#97BE5A
accent
#E543A6
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512498

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

Preview Lab → · Contrast checker → · Palette generator →

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