#512FAB#512FAB

#512FAB is a dark, vivid violet. Relative luminance 0.067; OKLCH L 42.7% C 0.185 H 288.6°. Best body text is #FFFFFF at 8.96:1 contrast (WCAG AA passes).

Color values

HEX#512FAB
RGBrgb(81, 47, 171)
HSLhsl(256, 57%, 43%)
HSVhsv(256, 73%, 67%)
CMYKcmyk(52.6%, 72.5%, 0%, 32.9%)
CIE-LABlab(31.17, 45.84, -60.96)
CIE-LCHlch(31.17, 76.27, 306.94°)
OKLaboklab(42.69% 0.0588 -0.1751)
OKLCHoklch(42.69% 0.185 288.6)
XYZxyz(11.7584, 6.7221, 39.1981)
Luminance0.0672 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512FAB #89AB2F
analogous
#2F4BAB #512FAB #8F2FAB
triadic
#512FAB #AB512F #2FAB51
tetradic
#512FAB #AB2F4B #89AB2F #2FAB8F
square
#512FAB #AB2F4B #89AB2F #2FAB8F
split-complementary
#512FAB #AB8F2F #4BAB2F
monochromatic
#24154B #3A227B #512FAB #6E4ACD #947ADA

Accessibility & contrast

On white

8.96
#512FAB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.34
#512FAB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512FAB
8.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512FAB#FFFFFF#000000##FFFFFF
##512FAB1.008.962.348.96
#FFFFFF8.961.0021.001.00
#0000002.3421.001.0021.00
##FFFFFF8.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CAF
Deuteranopia (green-blind)
#0046A9
Tritanopia (blue-blind)
#2F506A
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #512fab;
/* rgb */ color: rgb(81, 47, 171);
/* oklch */ color: oklch(42.7% 0.185 288.6);
Tailwind
colors: {
  custom: {
    50: '#8b6bc5',
    500: '#512fab',
    950: '#000000',
  },
}
SCSS
$custom: #512fab;
$custom-light: #8b6bc5;
$custom-dark: #000000;
JSON
{
  "hex": "#512fab",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 171
  },
  "hsl": {
    "h": 256.452,
    "s": 56.881,
    "l": 42.745
  },
  "oklch": {
    "l": 0.42685,
    "c": 0.18476,
    "h": 288.6
  },
  "luminance": 0.06723
}

Semantic roles & 50–950 ramp

primary
#512FAB
secondary
#ADC373
accent
#E048B6
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0713
muted
#7E7A82

Preview Lab

Preview with #512FAB

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

Preview Lab → · Contrast checker → · Palette generator →

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