#512A9C#512A9C

#512A9C is a dark, vivid violet. Relative luminance 0.058; OKLCH L 40.7% C 0.173 H 292.7°. Best body text is #FFFFFF at 9.72:1 contrast (WCAG AA passes).

Color values

HEX#512A9C
RGBrgb(81, 42, 156)
HSLhsl(261, 58%, 39%)
HSVhsv(261, 73%, 61%)
CMYKcmyk(48.1%, 73.1%, 0%, 38.8%)
CIE-LABlab(28.92, 44.16, -55.57)
CIE-LCHlch(28.92, 70.98, 308.47°)
OKLaboklab(40.68% 0.0666 -0.1593)
OKLCHoklch(40.68% 0.173 292.7)
XYZxyz(10.2204, 5.8052, 32.0281)
Luminance0.0581 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512A9C #759C2A
analogous
#2A3C9C #512A9C #8A2A9C
triadic
#512A9C #9C512A #2A9C51
tetradic
#512A9C #9C2A3C #759C2A #2A9C8A
square
#512A9C #9C2A3C #759C2A #2A9C8A
split-complementary
#512A9C #9C8A2A #3C9C2A
monochromatic
#1F103C #381D6C #512A9C #6B39CA #8F6AD7

Accessibility & contrast

On white

9.72
#512A9C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.16
#512A9C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512A9C
9.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512A9C#FFFFFF#000000##FFFFFF
##512A9C1.009.722.169.72
#FFFFFF9.721.0021.001.00
#0000002.1621.001.0021.00
##FFFFFF9.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00469F
Deuteranopia (green-blind)
#00429A
Tritanopia (blue-blind)
#3A4860
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #512a9c;
/* rgb */ color: rgb(81, 42, 156);
/* oklch */ color: oklch(40.7% 0.173 292.7);
Tailwind
colors: {
  custom: {
    50: '#8967ba',
    500: '#512a9c',
    950: '#000000',
  },
}
SCSS
$custom: #512a9c;
$custom-light: #8967ba;
$custom-dark: #000000;
JSON
{
  "hex": "#512a9c",
  "rgb": {
    "r": 81,
    "g": 42,
    "b": 156
  },
  "hsl": {
    "h": 260.526,
    "s": 57.576,
    "l": 38.824
  },
  "oklch": {
    "l": 0.40682,
    "c": 0.17268,
    "h": 292.7
  },
  "luminance": 0.05806
}

Semantic roles & 50–950 ramp

primary
#512A9C
secondary
#9FBD65
accent
#E147AC
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #512A9C

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

Preview Lab → · Contrast checker → · Palette generator →

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