#512A88#512A88

#512A88 is a dark, vivid violet. Relative luminance 0.052; OKLCH L 39.0% C 0.149 H 298.2°. Best body text is #FFFFFF at 10.31:1 contrast (WCAG AA passes).

Color values

HEX#512A88
RGBrgb(81, 42, 136)
HSLhsl(265, 53%, 35%)
HSVhsv(265, 69%, 53%)
CMYKcmyk(40.4%, 69.1%, 0%, 46.7%)
CIE-LABlab(27.25, 38.61, -45.96)
CIE-LCHlch(27.25, 60.03, 310.03°)
OKLaboklab(38.97% 0.0703 -0.1311)
OKLCHoklch(38.97% 0.149 298.2)
XYZxyz(8.6641, 5.1827, 23.8317)
Luminance0.0518 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512A88 #61882A
analogous
#2A3288 #512A88 #802A88
triadic
#512A88 #88512A #2A8851
tetradic
#512A88 #882A32 #61882A #2A8880
square
#512A88 #882A32 #61882A #2A8880
split-complementary
#512A88 #88802A #32882A
monochromatic
#190D2A #351C59 #512A88 #6D38B7 #8D5FCE

Accessibility & contrast

On white

10.31
#512A88 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.04
#512A88 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512A88
10.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512A88#FFFFFF#000000##FFFFFF
##512A881.0010.312.0410.31
#FFFFFF10.311.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00408B
Deuteranopia (green-blind)
#003F86
Tritanopia (blue-blind)
#444055
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #512a88;
/* rgb */ color: rgb(81, 42, 136);
/* oklch */ color: oklch(39.0% 0.149 298.2);
Tailwind
colors: {
  custom: {
    50: '#8766ab',
    500: '#512a88',
    950: '#000000',
  },
}
SCSS
$custom: #512a88;
$custom-light: #8766ab;
$custom-dark: #000000;
JSON
{
  "hex": "#512a88",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 136
  },
  "hsl": {
    "h": 264.894,
    "s": 52.809,
    "l": 34.902
  },
  "oklch": {
    "l": 0.38974,
    "c": 0.14874,
    "h": 298.2
  },
  "luminance": 0.05183
}

Semantic roles & 50–950 ramp

primary
#512A88
secondary
#8EB35B
accent
#DC4CA0
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512A88

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

Preview Lab → · Contrast checker → · Palette generator →

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