#512F7B#512F7B

#512F7B is a dark, vivid violet. Relative luminance 0.052; OKLCH L 38.7% C 0.125 H 301.4°. Best body text is #FFFFFF at 10.28:1 contrast (WCAG AA passes).

Color values

HEX#512F7B
RGBrgb(81, 47, 123)
HSLhsl(267, 45%, 33%)
HSVhsv(267, 62%, 48%)
CMYKcmyk(34.1%, 61.8%, 0%, 51.8%)
CIE-LABlab(27.33, 32.20, -37.68)
CIE-LCHlch(27.33, 49.57, 310.52°)
OKLaboklab(38.73% 0.0652 -0.1067)
OKLCHoklch(38.73% 0.125 301.4)
XYZxyz(7.9842, 5.2124, 19.3205)
Luminance0.0521 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512F7B #597B2F
analogous
#2F337B #512F7B #772F7B
triadic
#512F7B #7B512F #2F7B51
tetradic
#512F7B #7B2F33 #597B2F #2F7B77
square
#512F7B #7B2F33 #597B2F #2F7B77
split-complementary
#512F7B #7B772F #337B2F
monochromatic
#170D22 #341E4F #512F7B #6E40A7 #8D62C3

Accessibility & contrast

On white

10.28
#512F7B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.04
#512F7B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512F7B
10.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512F7B#FFFFFF#000000##FFFFFF
##512F7B1.0010.282.0410.28
#FFFFFF10.281.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#06407D
Deuteranopia (green-blind)
#194079
Tritanopia (blue-blind)
#493F50
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #512f7b;
/* rgb */ color: rgb(81, 47, 123);
/* oklch */ color: oklch(38.7% 0.125 301.4);
Tailwind
colors: {
  custom: {
    50: '#8569a2',
    500: '#512f7b',
    950: '#000000',
  },
}
SCSS
$custom: #512f7b;
$custom-light: #8569a2;
$custom-dark: #000000;
JSON
{
  "hex": "#512f7b",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 123
  },
  "hsl": {
    "h": 266.842,
    "s": 44.706,
    "l": 33.333
  },
  "oklch": {
    "l": 0.38728,
    "c": 0.12508,
    "h": 301.4
  },
  "luminance": 0.05212
}

Semantic roles & 50–950 ramp

primary
#512F7B
secondary
#87AA5C
accent
#D4539B
background
#F8F6FA
surface
#EFEBF3
border
#CAC6CD
text
#0B060F
muted
#7C7A7F

Preview Lab

Preview with #512F7B

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

Preview Lab → · Contrast checker → · Palette generator →

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