#512AB1#512AB1

#512AB1 is a dark, vivid violet. Relative luminance 0.066; OKLCH L 42.6% C 0.197 H 288.1°. Best body text is #FFFFFF at 9.07:1 contrast (WCAG AA passes).

Color values

HEX#512AB1
RGBrgb(81, 42, 177)
HSLhsl(257, 62%, 43%)
HSVhsv(257, 76%, 69%)
CMYKcmyk(54.2%, 76.3%, 0%, 30.6%)
CIE-LABlab(30.83, 50.06, -65.10)
CIE-LCHlch(30.83, 82.12, 307.56°)
OKLaboklab(42.61% 0.0614 -0.1872)
OKLCHoklch(42.61% 0.197 288.1)
XYZxyz(12.1548, 6.5790, 42.2159)
Luminance0.0658 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512AB1 #8AB12A
analogous
#2A47B1 #512AB1 #942AB1
triadic
#512AB1 #B1512A #2AB151
tetradic
#512AB1 #B12A47 #8AB12A #2AB194
square
#512AB1 #B12A47 #8AB12A #2AB194
split-complementary
#512AB1 #B1942A #47B12A
monochromatic
#24134E #3A1E80 #512AB1 #6E45D3 #9577DF

Accessibility & contrast

On white

9.07
#512AB1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.32
#512AB1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512AB1
9.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512AB1#FFFFFF#000000##FFFFFF
##512AB11.009.072.329.07
#FFFFFF9.071.0021.001.00
#0000002.3221.001.0021.00
##FFFFFF9.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BB5
Deuteranopia (green-blind)
#0045AF
Tritanopia (blue-blind)
#2A506C
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #512ab1;
/* rgb */ color: rgb(81, 42, 177);
/* oklch */ color: oklch(42.6% 0.197 288.1);
Tailwind
colors: {
  custom: {
    50: '#8c68c9',
    500: '#512ab1',
    950: '#000000',
  },
}
SCSS
$custom: #512ab1;
$custom-light: #8c68c9;
$custom-dark: #000000;
JSON
{
  "hex": "#512ab1",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 177
  },
  "hsl": {
    "h": 257.333,
    "s": 61.644,
    "l": 42.941
  },
  "oklch": {
    "l": 0.42615,
    "c": 0.19705,
    "h": 288.1
  },
  "luminance": 0.0658
}

Semantic roles & 50–950 ramp

primary
#512AB1
secondary
#AEC670
accent
#E543B6
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0613
muted
#7E7A82

Preview Lab

Preview with #512AB1

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

Preview Lab → · Contrast checker → · Palette generator →

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