#512CAF#512CAF

#512CAF is a dark, vivid violet. Relative luminance 0.066; OKLCH L 42.7% C 0.193 H 288.3°. Best body text is #FFFFFF at 9.02:1 contrast (WCAG AA passes).

Color values

HEX#512CAF
RGBrgb(81, 44, 175)
HSLhsl(257, 60%, 43%)
HSVhsv(257, 75%, 69%)
CMYKcmyk(53.7%, 74.9%, 0%, 31.4%)
CIE-LABlab(30.99, 48.52, -63.65)
CIE-LCHlch(30.99, 80.03, 307.32°)
OKLaboklab(42.67% 0.0604 -0.183)
OKLCHoklch(42.67% 0.193 288.3)
XYZxyz(12.0296, 6.6452, 41.1979)
Luminance0.0665 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512CAF #8AAF2C
analogous
#2C48AF #512CAF #932CAF
triadic
#512CAF #AF512C #2CAF51
tetradic
#512CAF #AF2C48 #8AAF2C #2CAF93
square
#512CAF #AF2C48 #8AAF2C #2CAF93
split-complementary
#512CAF #AF932C #48AF2C
monochromatic
#24134D #3A207E #512CAF #6E47D1 #9578DD

Accessibility & contrast

On white

9.02
#512CAF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.33
#512CAF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512CAF
9.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512CAF#FFFFFF#000000##FFFFFF
##512CAF1.009.022.339.02
#FFFFFF9.021.0021.001.00
#0000002.3321.001.0021.00
##FFFFFF9.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CB3
Deuteranopia (green-blind)
#0045AD
Tritanopia (blue-blind)
#2C506B
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #512caf;
/* rgb */ color: rgb(81, 44, 175);
/* oklch */ color: oklch(42.7% 0.193 288.3);
Tailwind
colors: {
  custom: {
    50: '#8c69c8',
    500: '#512caf',
    950: '#000000',
  },
}
SCSS
$custom: #512caf;
$custom-light: #8c69c8;
$custom-dark: #000000;
JSON
{
  "hex": "#512caf",
  "rgb": {
    "r": 81,
    "g": 44,
    "b": 175
  },
  "hsl": {
    "h": 256.947,
    "s": 59.817,
    "l": 42.941
  },
  "oklch": {
    "l": 0.42668,
    "c": 0.1927,
    "h": 288.3
  },
  "luminance": 0.06646
}

Semantic roles & 50–950 ramp

primary
#512CAF
secondary
#AEC572
accent
#E345B6
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0713
muted
#7E7A82

Preview Lab

Preview with #512CAF

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

Preview Lab → · Contrast checker → · Palette generator →

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