#512FB4#512FB4

#512FB4 is a dark, vivid violet. Relative luminance 0.071; OKLCH L 43.5% C 0.195 H 286.9°. Best body text is #FFFFFF at 8.69:1 contrast (WCAG AA passes).

Color values

HEX#512FB4
RGBrgb(81, 47, 180)
HSLhsl(255, 59%, 45%)
HSVhsv(255, 74%, 71%)
CMYKcmyk(55%, 73.9%, 0%, 29.4%)
CIE-LABlab(31.98, 48.44, -64.99)
CIE-LCHlch(31.98, 81.06, 306.70°)
OKLaboklab(43.51% 0.0568 -0.187)
OKLCHoklch(43.51% 0.195 286.9)
XYZxyz(12.6456, 7.0770, 43.8708)
Luminance0.0708 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512FB4 #92B42F
analogous
#2F50B4 #512FB4 #932FB4
triadic
#512FB4 #B4512F #2FB451
tetradic
#512FB4 #B42F50 #92B42F #2FB493
square
#512FB4 #B42F50 #92B42F #2FB493
split-complementary
#512FB4 #B4932F #50B42F
monochromatic
#251653 #3B2283 #512FB4 #704FD1 #9880DE

Accessibility & contrast

On white

8.69
#512FB4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512FB4
8.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512FB4#FFFFFF#000000##FFFFFF
##512FB41.008.692.428.69
#FFFFFF8.691.0021.001.00
#0000002.4221.001.0021.00
##FFFFFF8.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004EB8
Deuteranopia (green-blind)
#0047B2
Tritanopia (blue-blind)
#26536F
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #512fb4;
/* rgb */ color: rgb(81, 47, 180);
/* oklch */ color: oklch(43.5% 0.195 286.9);
Tailwind
colors: {
  custom: {
    50: '#8c6bcc',
    500: '#512fb4',
    950: '#000000',
  },
}
SCSS
$custom: #512fb4;
$custom-light: #8c6bcc;
$custom-dark: #000000;
JSON
{
  "hex": "#512fb4",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 180
  },
  "hsl": {
    "h": 255.338,
    "s": 58.59,
    "l": 44.51
  },
  "oklch": {
    "l": 0.43511,
    "c": 0.1954,
    "h": 286.9
  },
  "luminance": 0.07078
}

Semantic roles & 50–950 ramp

primary
#512FB4
secondary
#B3C778
accent
#E246BA
background
#F9F6FC
surface
#F1EBF9
border
#CBC6D2
text
#0D0713
muted
#7E7A82

Preview Lab

Preview with #512FB4

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

Preview Lab → · Contrast checker → · Palette generator →

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