#512F71#512F71

#512F71 is a dark, moderate violet. Relative luminance 0.050; OKLCH L 38.0% C 0.112 H 305.5°. Best body text is #FFFFFF at 10.53:1 contrast (WCAG AA passes).

Color values

HEX#512F71
RGBrgb(81, 47, 113)
HSLhsl(271, 41%, 31%)
HSVhsv(271, 58%, 44%)
CMYKcmyk(28.3%, 58.4%, 0%, 55.7%)
CIE-LABlab(26.66, 29.51, -32.40)
CIE-LCHlch(26.66, 43.83, 312.33°)
OKLaboklab(38.02% 0.0651 -0.0913)
OKLCHoklch(38.02% 0.112 305.5)
XYZxyz(7.3899, 4.9747, 16.1905)
Luminance0.0498 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512F71 #4F712F
analogous
#302F71 #512F71 #712F70
triadic
#512F71 #71512F #2F7151
tetradic
#512F71 #71302F #4F712F #2F7071
square
#512F71 #71302F #4F712F #2F7071
split-complementary
#512F71 #70712F #2F7130
monochromatic
#130B1B #321D46 #512F71 #70419C #8F5EBC

Accessibility & contrast

On white

10.53
#512F71 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.00
#512F71 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512F71
10.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512F71#FFFFFF#000000##FFFFFF
##512F711.0010.532.0010.53
#FFFFFF10.531.0021.001.00
#0000002.0021.001.0021.00
##FFFFFF10.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#173E73
Deuteranopia (green-blind)
#233F6F
Tritanopia (blue-blind)
#4C3B4B
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #512f71;
/* rgb */ color: rgb(81, 47, 113);
/* oklch */ color: oklch(38.0% 0.112 305.5);
Tailwind
colors: {
  custom: {
    50: '#84699a',
    500: '#512f71',
    950: '#000000',
  },
}
SCSS
$custom: #512f71;
$custom-light: #84699a;
$custom-dark: #000000;
JSON
{
  "hex": "#512f71",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 113
  },
  "hsl": {
    "h": 270.909,
    "s": 41.25,
    "l": 31.373
  },
  "oklch": {
    "l": 0.38023,
    "c": 0.11211,
    "h": 305.5
  },
  "luminance": 0.04975
}

Semantic roles & 50–950 ramp

primary
#512F71
secondary
#7DA25A
accent
#D15792
background
#F8F6F9
surface
#EFEBF2
border
#CAC6CC
text
#0B060E
muted
#7C7A7E

Preview Lab

Preview with #512F71

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

Preview Lab → · Contrast checker → · Palette generator →

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