#512AAB#512AAB

#512AAB is a dark, vivid violet. Relative luminance 0.063; OKLCH L 42.0% C 0.190 H 289.3°. Best body text is #FFFFFF at 9.25:1 contrast (WCAG AA passes).

Color values

HEX#512AAB
RGBrgb(81, 42, 171)
HSLhsl(258, 61%, 42%)
HSVhsv(258, 75%, 67%)
CMYKcmyk(52.6%, 75.4%, 0%, 32.9%)
CIE-LABlab(30.27, 48.37, -62.43)
CIE-LCHlch(30.27, 78.98, 307.77°)
OKLaboklab(42.05% 0.063 -0.1794)
OKLCHoklch(42.05% 0.19 289.3)
XYZxyz(11.5699, 6.3450, 39.1353)
Luminance0.0635 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512AAB #84AB2A
analogous
#2A43AB #512AAB #922AAB
triadic
#512AAB #AB512A #2AAB51
tetradic
#512AAB #AB2A43 #84AB2A #2AAB92
square
#512AAB #AB2A43 #84AB2A #2AAB92
split-complementary
#512AAB #AB922A #43AB2A
monochromatic
#221249 #3A1E7A #512AAB #6D42D1 #9373DD

Accessibility & contrast

On white

9.25
#512AAB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.27
#512AAB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512AAB
9.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512AAB#FFFFFF#000000##FFFFFF
##512AAB1.009.252.279.25
#FFFFFF9.251.0021.001.00
#0000002.2721.001.0021.00
##FFFFFF9.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AAF
Deuteranopia (green-blind)
#0044A9
Tritanopia (blue-blind)
#2F4E69
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #512aab;
/* rgb */ color: rgb(81, 42, 171);
/* oklch */ color: oklch(42.0% 0.190 289.3);
Tailwind
colors: {
  custom: {
    50: '#8b68c5',
    500: '#512aab',
    950: '#000000',
  },
}
SCSS
$custom: #512aab;
$custom-light: #8b68c5;
$custom-dark: #000000;
JSON
{
  "hex": "#512aab",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 171
  },
  "hsl": {
    "h": 258.14,
    "s": 60.563,
    "l": 41.765
  },
  "oklch": {
    "l": 0.4205,
    "c": 0.19017,
    "h": 289.3
  },
  "luminance": 0.06346
}

Semantic roles & 50–950 ramp

primary
#512AAB
secondary
#AAC46D
accent
#E444B3
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0613
muted
#7E7A82

Preview Lab

Preview with #512AAB

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

Preview Lab → · Contrast checker → · Palette generator →

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