#512BB2#512BB2

#512BB2 is a dark, vivid violet. Relative luminance 0.067; OKLCH L 42.8% C 0.197 H 287.8°. Best body text is #FFFFFF at 8.98:1 contrast (WCAG AA passes).

Color values

HEX#512BB2
RGBrgb(81, 43, 178)
HSLhsl(257, 61%, 43%)
HSVhsv(257, 76%, 70%)
CMYKcmyk(54.5%, 75.8%, 0%, 30.2%)
CIE-LABlab(31.09, 49.86, -65.26)
CIE-LCHlch(31.09, 82.13, 307.38°)
OKLaboklab(42.83% 0.0604 -0.1877)
OKLCHoklch(42.83% 0.197 287.8)
XYZxyz(12.2907, 6.6908, 42.7547)
Luminance0.0669 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512BB2 #8CB22B
analogous
#2B48B2 #512BB2 #942BB2
triadic
#512BB2 #B2512B #2BB251
tetradic
#512BB2 #B22B48 #8CB22B #2BB294
square
#512BB2 #B22B48 #8CB22B #2BB294
split-complementary
#512BB2 #B2942B #48B22B
monochromatic
#24134F #3B1F81 #512BB2 #6F48D3 #9579DF

Accessibility & contrast

On white

8.98
#512BB2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512BB2
8.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512BB2#FFFFFF#000000##FFFFFF
##512BB21.008.982.348.98
#FFFFFF8.981.0021.001.00
#0000002.3421.001.0021.00
##FFFFFF8.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CB6
Deuteranopia (green-blind)
#0046AF
Tritanopia (blue-blind)
#29516D
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #512bb2;
/* rgb */ color: rgb(81, 43, 178);
/* oklch */ color: oklch(42.8% 0.197 287.8);
Tailwind
colors: {
  custom: {
    50: '#8c69ca',
    500: '#512bb2',
    950: '#000000',
  },
}
SCSS
$custom: #512bb2;
$custom-light: #8c69ca;
$custom-dark: #000000;
JSON
{
  "hex": "#512bb2",
  "rgb": {
    "r": 81,
    "g": 43,
    "b": 178
  },
  "hsl": {
    "h": 256.889,
    "s": 61.086,
    "l": 43.333
  },
  "oklch": {
    "l": 0.42829,
    "c": 0.1972,
    "h": 287.8
  },
  "luminance": 0.06691
}

Semantic roles & 50–950 ramp

primary
#512BB2
secondary
#AFC772
accent
#E444B7
background
#F9F6FC
surface
#F1EBF9
border
#CBC6D2
text
#0D0613
muted
#7E7A82

Preview Lab

Preview with #512BB2

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

Preview Lab → · Contrast checker → · Palette generator →

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