#512F9B#512F9B

#512F9B is a dark, vivid violet. Relative luminance 0.061; OKLCH L 41.3% C 0.165 H 292.0°. Best body text is #FFFFFF at 9.42:1 contrast (WCAG AA passes).

Color values

HEX#512F9B
RGBrgb(81, 47, 155)
HSLhsl(259, 53%, 40%)
HSVhsv(259, 70%, 61%)
CMYKcmyk(47.7%, 69.7%, 0%, 39.2%)
CIE-LABlab(29.78, 41.22, -53.54)
CIE-LCHlch(29.78, 67.57, 307.59°)
OKLaboklab(41.27% 0.0619 -0.1534)
OKLCHoklch(41.27% 0.165 292)
XYZxyz(10.3246, 6.1486, 31.6468)
Luminance0.0615 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512F9B #799B2F
analogous
#2F439B #512F9B #872F9B
triadic
#512F9B #9B512F #2F9B51
tetradic
#512F9B #9B2F43 #799B2F #2F9B87
square
#512F9B #9B2F43 #799B2F #2F9B87
split-complementary
#512F9B #9B872F #439B2F
monochromatic
#20133D #38216C #512F9B #6B42C6 #9071D4

Accessibility & contrast

On white

9.42
#512F9B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.23
#512F9B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512F9B
9.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512F9B#FFFFFF#000000##FFFFFF
##512F9B1.009.422.239.42
#FFFFFF9.421.0021.001.00
#0000002.2321.001.0021.00
##FFFFFF9.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00489E
Deuteranopia (green-blind)
#004499
Tritanopia (blue-blind)
#3A4A61
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #512f9b;
/* rgb */ color: rgb(81, 47, 155);
/* oklch */ color: oklch(41.3% 0.165 292.0);
Tailwind
colors: {
  custom: {
    50: '#896ab9',
    500: '#512f9b',
    950: '#000000',
  },
}
SCSS
$custom: #512f9b;
$custom-light: #896ab9;
$custom-dark: #000000;
JSON
{
  "hex": "#512f9b",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 155
  },
  "hsl": {
    "h": 258.889,
    "s": 53.465,
    "l": 39.608
  },
  "oklch": {
    "l": 0.41274,
    "c": 0.16542,
    "h": 292
  },
  "luminance": 0.06149
}

Semantic roles & 50–950 ramp

primary
#512F9B
secondary
#A2BB6A
accent
#DD4BAF
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0712
muted
#7D7A81

Preview Lab

Preview with #512F9B

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

Preview Lab → · Contrast checker → · Palette generator →

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