#512C94#512C94

#512C94 is a dark, vivid violet. Relative luminance 0.057; OKLCH L 40.3% C 0.161 H 294.3°. Best body text is #FFFFFF at 9.82:1 contrast (WCAG AA passes).

Color values

HEX#512C94
RGBrgb(81, 44, 148)
HSLhsl(261, 54%, 38%)
HSVhsv(261, 70%, 58%)
CMYKcmyk(45.3%, 70.3%, 0%, 42%)
CIE-LABlab(28.61, 40.86, -51.17)
CIE-LCHlch(28.61, 65.48, 308.61°)
OKLaboklab(40.26% 0.0662 -0.1464)
OKLCHoklch(40.26% 0.161 294.3)
XYZxyz(9.6379, 5.6886, 28.6014)
Luminance0.0569 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512C94 #6F942C
analogous
#2C3B94 #512C94 #852C94
triadic
#512C94 #94512C #2C9451
tetradic
#512C94 #942C3B #6F942C #2C9485
square
#512C94 #942C3B #6F942C #2C9485
split-complementary
#512C94 #94852C #3B942C
monochromatic
#1D1036 #371E65 #512C94 #6B3AC3 #8E68D2

Accessibility & contrast

On white

9.82
#512C94 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.14
#512C94 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512C94
9.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512C94#FFFFFF#000000##FFFFFF
##512C941.009.822.149.82
#FFFFFF9.821.0021.001.00
#0000002.1421.001.0021.00
##FFFFFF9.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004497
Deuteranopia (green-blind)
#004292
Tritanopia (blue-blind)
#3E465C
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #512c94;
/* rgb */ color: rgb(81, 44, 148);
/* oklch */ color: oklch(40.3% 0.161 294.3);
Tailwind
colors: {
  custom: {
    50: '#8868b4',
    500: '#512c94',
    950: '#000000',
  },
}
SCSS
$custom: #512c94;
$custom-light: #8868b4;
$custom-dark: #000000;
JSON
{
  "hex": "#512c94",
  "rgb": {
    "r": 81,
    "g": 44,
    "b": 148
  },
  "hsl": {
    "h": 261.346,
    "s": 54.167,
    "l": 37.647
  },
  "oklch": {
    "l": 0.40255,
    "c": 0.16067,
    "h": 294.3
  },
  "luminance": 0.05689
}

Semantic roles & 50–950 ramp

primary
#512C94
secondary
#9AB963
accent
#DE4AA9
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512C94

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

Preview Lab → · Contrast checker → · Palette generator →

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