#512158#512158

#512158 is a dark, moderate purple. Relative luminance 0.035; OKLCH L 34.2% C 0.106 H 322.4°. Best body text is #FFFFFF at 12.29:1 contrast (WCAG AA passes).

Color values

HEX#512158
RGBrgb(81, 33, 88)
HSLhsl(292, 45%, 24%)
HSVhsv(292, 63%, 35%)
CMYKcmyk(8%, 62.5%, 0%, 65.5%)
CIE-LABlab(22.10, 31.49, -23.38)
CIE-LCHlch(22.10, 39.22, 323.41°)
OKLaboklab(34.17% 0.0842 -0.0649)
OKLCHoklch(34.17% 0.106 322.4)
XYZxyz(5.6985, 3.5419, 9.6141)
Luminance0.0354 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512158 #285821
analogous
#352158 #512158 #582143
triadic
#512158 #585121 #215851
tetradic
#512158 #583521 #285821 #214358
square
#512158 #583521 #285821 #214358
split-complementary
#512158 #435821 #215835
monochromatic
#140816 #28102B #512158 #7A3285 #A342B1

Accessibility & contrast

On white

12.29
#512158 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.71
#512158 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512158
12.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512158#FFFFFF#000000##FFFFFF
##5121581.0012.291.7112.29
#FFFFFF12.291.0021.001.00
#0000001.7121.001.0021.00
##FFFFFF12.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#17315A
Deuteranopia (green-blind)
#283757
Tritanopia (blue-blind)
#522939
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #512158;
/* rgb */ color: rgb(81, 33, 88);
/* oklch */ color: oklch(34.2% 0.106 322.4);
Tailwind
colors: {
  custom: {
    50: '#845f87',
    500: '#512158',
    950: '#000000',
  },
}
SCSS
$custom: #512158;
$custom-light: #845f87;
$custom-dark: #000000;
JSON
{
  "hex": "#512158",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 88
  },
  "hsl": {
    "h": 292.364,
    "s": 45.455,
    "l": 23.725
  },
  "oklch": {
    "l": 0.34174,
    "c": 0.10633,
    "h": 322.4
  },
  "luminance": 0.03542
}

Semantic roles & 50–950 ramp

primary
#512158
secondary
#518C49
accent
#D55363
background
#F8F5F8
surface
#EFE9EF
border
#CAC5CA
text
#0B050B
muted
#7C797C

Preview Lab

Preview with #512158

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

Preview Lab → · Contrast checker → · Palette generator →

#512158 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva