#512F98#512F98

#512F98 is a dark, vivid violet. Relative luminance 0.060; OKLCH L 41.0% C 0.162 H 292.7°. Best body text is #FFFFFF at 9.50:1 contrast (WCAG AA passes).

Color values

HEX#512F98
RGBrgb(81, 47, 152)
HSLhsl(259, 53%, 39%)
HSVhsv(259, 69%, 60%)
CMYKcmyk(46.7%, 69.1%, 0%, 40.4%)
CIE-LABlab(29.54, 40.36, -52.12)
CIE-LCHlch(29.54, 65.92, 307.76°)
OKLaboklab(41.02% 0.0624 -0.1492)
OKLCHoklch(41.02% 0.162 292.7)
XYZxyz(10.0758, 6.0490, 30.3364)
Luminance0.0605 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512F98 #76982F
analogous
#2F4198 #512F98 #862F98
triadic
#512F98 #98512F #2F9851
tetradic
#512F98 #982F41 #76982F #2F9886
square
#512F98 #982F41 #76982F #2F9886
split-complementary
#512F98 #98862F #41982F
monochromatic
#1F123B #382169 #512F98 #6B40C4 #8F6FD2

Accessibility & contrast

On white

9.50
#512F98 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.21
#512F98 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512F98
9.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512F98#FFFFFF#000000##FFFFFF
##512F981.009.502.219.50
#FFFFFF9.501.0021.001.00
#0000002.2121.001.0021.00
##FFFFFF9.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00479B
Deuteranopia (green-blind)
#004496
Tritanopia (blue-blind)
#3C495F
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #512f98;
/* rgb */ color: rgb(81, 47, 152);
/* oklch */ color: oklch(41.0% 0.162 292.7);
Tailwind
colors: {
  custom: {
    50: '#886ab7',
    500: '#512f98',
    950: '#000000',
  },
}
SCSS
$custom: #512f98;
$custom-light: #886ab7;
$custom-dark: #000000;
JSON
{
  "hex": "#512f98",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 152
  },
  "hsl": {
    "h": 259.429,
    "s": 52.764,
    "l": 39.02
  },
  "oklch": {
    "l": 0.41018,
    "c": 0.16173,
    "h": 292.7
  },
  "luminance": 0.06049
}

Semantic roles & 50–950 ramp

primary
#512F98
secondary
#A0BA69
accent
#DC4CAD
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512F98

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

Preview Lab → · Contrast checker → · Palette generator →

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