#512FB5#512FB5

#512FB5 is a dark, vivid violet. Relative luminance 0.071; OKLCH L 43.6% C 0.197 H 286.7°. Best body text is #FFFFFF at 8.66:1 contrast (WCAG AA passes).

Color values

HEX#512FB5
RGBrgb(81, 47, 181)
HSLhsl(255, 59%, 45%)
HSVhsv(255, 74%, 71%)
CMYKcmyk(55.2%, 74%, 0%, 29%)
CIE-LABlab(32.07, 48.72, -65.43)
CIE-LCHlch(32.07, 81.58, 306.67°)
OKLaboklab(43.61% 0.0565 -0.1883)
OKLCHoklch(43.61% 0.197 286.7)
XYZxyz(12.7479, 7.1179, 44.4093)
Luminance0.0712 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512FB5 #93B52F
analogous
#2F50B5 #512FB5 #942FB5
triadic
#512FB5 #B5512F #2FB551
tetradic
#512FB5 #B52F50 #93B52F #2FB594
square
#512FB5 #B52F50 #93B52F #2FB594
split-complementary
#512FB5 #B5942F #50B52F
monochromatic
#261654 #3B2284 #512FB5 #7150D1 #9880DE

Accessibility & contrast

On white

8.66
#512FB5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.42
#512FB5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512FB5
8.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512FB5#FFFFFF#000000##FFFFFF
##512FB51.008.662.428.66
#FFFFFF8.661.0021.001.00
#0000002.4221.001.0021.00
##FFFFFF8.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004FB9
Deuteranopia (green-blind)
#0048B2
Tritanopia (blue-blind)
#25546F
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #512fb5;
/* rgb */ color: rgb(81, 47, 181);
/* oklch */ color: oklch(43.6% 0.197 286.7);
Tailwind
colors: {
  custom: {
    50: '#8d6bcc',
    500: '#512fb5',
    950: '#000000',
  },
}
SCSS
$custom: #512fb5;
$custom-light: #8d6bcc;
$custom-dark: #000000;
JSON
{
  "hex": "#512fb5",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 181
  },
  "hsl": {
    "h": 255.224,
    "s": 58.772,
    "l": 44.706
  },
  "oklch": {
    "l": 0.43605,
    "c": 0.19657,
    "h": 286.7
  },
  "luminance": 0.07119
}

Semantic roles & 50–950 ramp

primary
#512FB5
secondary
#B3C779
accent
#E246BA
background
#F9F6FC
surface
#F1EBF9
border
#CBC6D2
text
#0D0714
muted
#7E7A82

Preview Lab

Preview with #512FB5

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

Preview Lab → · Contrast checker → · Palette generator →

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