#512FA5#512FA5

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

Color values

HEX#512FA5
RGBrgb(81, 47, 165)
HSLhsl(257, 56%, 42%)
HSVhsv(257, 72%, 65%)
CMYKcmyk(50.9%, 71.5%, 0%, 35.3%)
CIE-LABlab(30.64, 44.10, -58.21)
CIE-LCHlch(30.64, 73.03, 307.15°)
OKLaboklab(42.15% 0.0601 -0.1671)
OKLCHoklch(42.15% 0.178 289.8)
XYZxyz(11.1994, 6.4985, 36.2542)
Luminance0.0650 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512FA5 #83A52F
analogous
#2F48A5 #512FA5 #8C2FA5
triadic
#512FA5 #A5512F #2FA551
tetradic
#512FA5 #A52F48 #83A52F #2FA58C
square
#512FA5 #A52F48 #83A52F #2FA58C
split-complementary
#512FA5 #A58C2F #48A52F
monochromatic
#221446 #3A2175 #512FA5 #6D47CB #9276D8

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##512FA5#FFFFFF#000000##FFFFFF
##512FA51.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)
#004AA8
Deuteranopia (green-blind)
#0045A3
Tritanopia (blue-blind)
#344E67
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #512fa5;
/* rgb */ color: rgb(81, 47, 165);
/* oklch */ color: oklch(42.1% 0.178 289.8);
Tailwind
colors: {
  custom: {
    50: '#8a6ac1',
    500: '#512fa5',
    950: '#000000',
  },
}
SCSS
$custom: #512fa5;
$custom-light: #8a6ac1;
$custom-dark: #000000;
JSON
{
  "hex": "#512fa5",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 165
  },
  "hsl": {
    "h": 257.288,
    "s": 55.66,
    "l": 41.569
  },
  "oklch": {
    "l": 0.42146,
    "c": 0.17757,
    "h": 289.8
  },
  "luminance": 0.06499
}

Semantic roles & 50–950 ramp

primary
#512FA5
secondary
#A9C070
accent
#DF49B4
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0D0712
muted
#7D7A81

Preview Lab

Preview with #512FA5

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

Preview Lab → · Contrast checker → · Palette generator →

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