#512B98#512B98

#512B98 is a dark, vivid violet. Relative luminance 0.057; OKLCH L 40.5% C 0.167 H 293.5°. Best body text is #FFFFFF at 9.77:1 contrast (WCAG AA passes).

Color values

HEX#512B98
RGBrgb(81, 43, 152)
HSLhsl(261, 56%, 38%)
HSVhsv(261, 72%, 60%)
CMYKcmyk(46.7%, 71.7%, 0%, 40.4%)
CIE-LABlab(28.76, 42.52, -53.39)
CIE-LCHlch(28.76, 68.25, 308.54°)
OKLaboklab(40.46% 0.0665 -0.1529)
OKLCHoklch(40.46% 0.167 293.5)
XYZxyz(9.9232, 5.7438, 30.2855)
Luminance0.0574 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512B98 #72982B
analogous
#2B3C98 #512B98 #872B98
triadic
#512B98 #98512B #2B9851
tetradic
#512B98 #982B3C #72982B #2B9887
square
#512B98 #982B3C #72982B #2B9887
split-complementary
#512B98 #98872B #3C982B
monochromatic
#1E1039 #381E68 #512B98 #6B39C7 #8E69D5

Accessibility & contrast

On white

9.77
#512B98 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.15
#512B98 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512B98
9.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512B98#FFFFFF#000000##FFFFFF
##512B981.009.772.159.77
#FFFFFF9.771.0021.001.00
#0000002.1521.001.0021.00
##FFFFFF9.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00459B
Deuteranopia (green-blind)
#004296
Tritanopia (blue-blind)
#3C475E
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #512b98;
/* rgb */ color: rgb(81, 43, 152);
/* oklch */ color: oklch(40.5% 0.167 293.5);
Tailwind
colors: {
  custom: {
    50: '#8968b7',
    500: '#512b98',
    950: '#000000',
  },
}
SCSS
$custom: #512b98;
$custom-light: #8968b7;
$custom-dark: #000000;
JSON
{
  "hex": "#512b98",
  "rgb": {
    "r": 81,
    "g": 43,
    "b": 152
  },
  "hsl": {
    "h": 260.917,
    "s": 55.897,
    "l": 38.235
  },
  "oklch": {
    "l": 0.40462,
    "c": 0.16673,
    "h": 293.5
  },
  "luminance": 0.05744
}

Semantic roles & 50–950 ramp

primary
#512B98
secondary
#9DBB64
accent
#DF49AB
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512B98

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

Preview Lab → · Contrast checker → · Palette generator →

#512B98 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva