#512AAF#512AAF

#512AAF is a dark, vivid violet. Relative luminance 0.065; OKLCH L 42.4% C 0.195 H 288.5°. Best body text is #FFFFFF at 9.13:1 contrast (WCAG AA passes).

Color values

HEX#512AAF
RGBrgb(81, 42, 175)
HSLhsl(258, 61%, 43%)
HSVhsv(258, 76%, 69%)
CMYKcmyk(53.7%, 76%, 0%, 31.4%)
CIE-LABlab(30.64, 49.50, -64.21)
CIE-LCHlch(30.64, 81.08, 307.63°)
OKLaboklab(42.43% 0.0619 -0.1847)
OKLCHoklch(42.43% 0.195 288.5)
XYZxyz(11.9569, 6.4998, 41.1737)
Luminance0.0650 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512AAF #88AF2A
analogous
#2A46AF #512AAF #932AAF
triadic
#512AAF #AF512A #2AAF51
tetradic
#512AAF #AF2A46 #88AF2A #2AAF93
square
#512AAF #AF2A46 #88AF2A #2AAF93
split-complementary
#512AAF #AF932A #46AF2A
monochromatic
#23124C #3A1E7E #512AAF #6E44D2 #9475DE

Accessibility & contrast

On white

9.13
#512AAF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.30
#512AAF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512AAF
9.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512AAF#FFFFFF#000000##FFFFFF
##512AAF1.009.132.309.13
#FFFFFF9.131.0021.001.00
#0000002.3021.001.0021.00
##FFFFFF9.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BB3
Deuteranopia (green-blind)
#0045AD
Tritanopia (blue-blind)
#2C4F6B
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #512aaf;
/* rgb */ color: rgb(81, 42, 175);
/* oklch */ color: oklch(42.4% 0.195 288.5);
Tailwind
colors: {
  custom: {
    50: '#8c68c8',
    500: '#512aaf',
    950: '#000000',
  },
}
SCSS
$custom: #512aaf;
$custom-light: #8c68c8;
$custom-dark: #000000;
JSON
{
  "hex": "#512aaf",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 175
  },
  "hsl": {
    "h": 257.594,
    "s": 61.29,
    "l": 42.549
  },
  "oklch": {
    "l": 0.42426,
    "c": 0.19476,
    "h": 288.5
  },
  "luminance": 0.065
}

Semantic roles & 50–950 ramp

primary
#512AAF
secondary
#ACC66F
accent
#E443B5
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0613
muted
#7E7A82

Preview Lab

Preview with #512AAF

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

Preview Lab → · Contrast checker → · Palette generator →

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