#512B9E#512B9E

#512B9E is a dark, vivid violet. Relative luminance 0.059; OKLCH L 41.0% C 0.174 H 292.0°. Best body text is #FFFFFF at 9.59:1 contrast (WCAG AA passes).

Color values

HEX#512B9E
RGBrgb(81, 43, 158)
HSLhsl(260, 57%, 39%)
HSVhsv(260, 73%, 62%)
CMYKcmyk(48.7%, 72.8%, 0%, 38%)
CIE-LABlab(29.27, 44.21, -56.20)
CIE-LCHlch(29.27, 71.51, 308.19°)
OKLaboklab(40.99% 0.0652 -0.1612)
OKLCHoklch(40.99% 0.174 292)
XYZxyz(10.4270, 5.9453, 32.9393)
Luminance0.0595 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512B9E #789E2B
analogous
#2B3F9E #512B9E #8B2B9E
triadic
#512B9E #9E512B #2B9E51
tetradic
#512B9E #9E2B3F #789E2B #2B9E8B
square
#512B9E #9E2B3F #789E2B #2B9E8B
split-complementary
#512B9E #9E8B2B #3F9E2B
monochromatic
#20113E #381E6E #512B9E #6B3CCA #906CD7

Accessibility & contrast

On white

9.59
#512B9E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.19
#512B9E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512B9E
9.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512B9E#FFFFFF#000000##FFFFFF
##512B9E1.009.592.199.59
#FFFFFF9.591.0021.001.00
#0000002.1921.001.0021.00
##FFFFFF9.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047A1
Deuteranopia (green-blind)
#00439C
Tritanopia (blue-blind)
#394962
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #512b9e;
/* rgb */ color: rgb(81, 43, 158);
/* oklch */ color: oklch(41.0% 0.174 292.0);
Tailwind
colors: {
  custom: {
    50: '#8968bc',
    500: '#512b9e',
    950: '#000000',
  },
}
SCSS
$custom: #512b9e;
$custom-light: #8968bc;
$custom-dark: #000000;
JSON
{
  "hex": "#512b9e",
  "rgb": {
    "r": 81,
    "g": 43,
    "b": 158
  },
  "hsl": {
    "h": 259.826,
    "s": 57.214,
    "l": 39.412
  },
  "oklch": {
    "l": 0.4099,
    "c": 0.17388,
    "h": 292
  },
  "luminance": 0.05946
}

Semantic roles & 50–950 ramp

primary
#512B9E
secondary
#A1BE67
accent
#E047AE
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #512B9E

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

Preview Lab → · Contrast checker → · Palette generator →

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