#512FB1#512FB1

#512FB1 is a dark, vivid violet. Relative luminance 0.070; OKLCH L 43.2% C 0.192 H 287.4°. Best body text is #FFFFFF at 8.78:1 contrast (WCAG AA passes).

Color values

HEX#512FB1
RGBrgb(81, 47, 177)
HSLhsl(256, 58%, 44%)
HSVhsv(256, 73%, 69%)
CMYKcmyk(54.2%, 73.4%, 0%, 30.6%)
CIE-LABlab(31.71, 47.57, -63.66)
CIE-LCHlch(31.71, 79.47, 306.77°)
OKLaboklab(43.23% 0.0575 -0.1831)
OKLCHoklch(43.23% 0.192 287.4)
XYZxyz(12.3433, 6.9561, 42.2787)
Luminance0.0696 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512FB1 #8FB12F
analogous
#2F4EB1 #512FB1 #922FB1
triadic
#512FB1 #B1512F #2FB151
tetradic
#512FB1 #B12F4E #8FB12F #2FB192
square
#512FB1 #B12F4E #8FB12F #2FB192
split-complementary
#512FB1 #B1922F #4EB12F
monochromatic
#251550 #3B2281 #512FB1 #6F4DD0 #977EDD

Accessibility & contrast

On white

8.78
#512FB1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.39
#512FB1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512FB1
8.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512FB1#FFFFFF#000000##FFFFFF
##512FB11.008.782.398.78
#FFFFFF8.781.0021.001.00
#0000002.3921.001.0021.00
##FFFFFF8.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004EB5
Deuteranopia (green-blind)
#0047AF
Tritanopia (blue-blind)
#29526D
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #512fb1;
/* rgb */ color: rgb(81, 47, 177);
/* oklch */ color: oklch(43.2% 0.192 287.4);
Tailwind
colors: {
  custom: {
    50: '#8c6bc9',
    500: '#512fb1',
    950: '#000000',
  },
}
SCSS
$custom: #512fb1;
$custom-light: #8c6bc9;
$custom-dark: #000000;
JSON
{
  "hex": "#512fb1",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 177
  },
  "hsl": {
    "h": 255.692,
    "s": 58.036,
    "l": 43.922
  },
  "oklch": {
    "l": 0.43233,
    "c": 0.19186,
    "h": 287.4
  },
  "luminance": 0.06957
}

Semantic roles & 50–950 ramp

primary
#512FB1
secondary
#B1C576
accent
#E147B9
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0713
muted
#7E7A82

Preview Lab

Preview with #512FB1

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

Preview Lab → · Contrast checker → · Palette generator →

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