#512FA8#512FA8

#512FA8 is a dark, vivid violet. Relative luminance 0.066; OKLCH L 42.4% C 0.181 H 289.2°. Best body text is #FFFFFF at 9.04:1 contrast (WCAG AA passes).

Color values

HEX#512FA8
RGBrgb(81, 47, 168)
HSLhsl(257, 56%, 42%)
HSVhsv(257, 72%, 66%)
CMYKcmyk(51.8%, 72%, 0%, 34.1%)
CIE-LABlab(30.90, 44.97, -59.59)
CIE-LCHlch(30.90, 74.66, 307.04°)
OKLaboklab(42.41% 0.0595 -0.1711)
OKLCHoklch(42.41% 0.181 289.2)
XYZxyz(11.4757, 6.6090, 37.7092)
Luminance0.0661 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512FA8 #86A82F
analogous
#2F49A8 #512FA8 #8E2FA8
triadic
#512FA8 #A8512F #2FA851
tetradic
#512FA8 #A82F49 #86A82F #2FA88E
square
#512FA8 #A82F49 #86A82F #2FA88E
split-complementary
#512FA8 #A88E2F #49A82F
monochromatic
#231448 #3A2278 #512FA8 #6D48CC #9378D9

Accessibility & contrast

On white

9.04
#512FA8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512FA8
9.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512FA8#FFFFFF#000000##FFFFFF
##512FA81.009.042.329.04
#FFFFFF9.041.0021.001.00
#0000002.3221.001.0021.00
##FFFFFF9.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BAC
Deuteranopia (green-blind)
#0046A6
Tritanopia (blue-blind)
#314F68
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #512fa8;
/* rgb */ color: rgb(81, 47, 168);
/* oklch */ color: oklch(42.4% 0.181 289.2);
Tailwind
colors: {
  custom: {
    50: '#8b6bc3',
    500: '#512fa8',
    950: '#000000',
  },
}
SCSS
$custom: #512fa8;
$custom-light: #8b6bc3;
$custom-dark: #000000;
JSON
{
  "hex": "#512fa8",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 168
  },
  "hsl": {
    "h": 256.86,
    "s": 56.279,
    "l": 42.157
  },
  "oklch": {
    "l": 0.42414,
    "c": 0.18117,
    "h": 289.2
  },
  "luminance": 0.0661
}

Semantic roles & 50–950 ramp

primary
#512FA8
secondary
#ABC171
accent
#E048B5
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0713
muted
#7E7A82

Preview Lab

Preview with #512FA8

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

Preview Lab → · Contrast checker → · Palette generator →

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