#512266#512266

#512266 is a dark, vivid purple. Relative luminance 0.039; OKLCH L 35.2% C 0.120 H 313.8°. Best body text is #FFFFFF at 11.86:1 contrast (WCAG AA passes).

Color values

HEX#512266
RGBrgb(81, 34, 102)
HSLhsl(281, 50%, 27%)
HSVhsv(281, 67%, 40%)
CMYKcmyk(20.6%, 66.7%, 0%, 60%)
CIE-LABlab(23.18, 34.15, -30.87)
CIE-LCHlch(23.18, 46.04, 317.89°)
OKLaboklab(35.25% 0.0833 -0.0867)
OKLCHoklch(35.25% 0.12 313.8)
XYZxyz(6.3632, 3.8529, 12.9763)
Luminance0.0385 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512266 #376622
analogous
#2F2266 #512266 #662259
triadic
#512266 #665122 #226651
tetradic
#512266 #662F22 #376622 #225966
square
#512266 #662F22 #376622 #225966
split-complementary
#512266 #596622 #22662F
monochromatic
#120817 #2D1338 #512266 #753194 #9942C0

Accessibility & contrast

On white

11.86
#512266 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.77
#512266 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512266
11.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512266#FFFFFF#000000##FFFFFF
##5122661.0011.861.7711.86
#FFFFFF11.861.0021.001.00
#0000001.7721.001.0021.00
##FFFFFF11.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#073568
Deuteranopia (green-blind)
#1F3864
Tritanopia (blue-blind)
#4F2F40
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #512266;
/* rgb */ color: rgb(81, 34, 102);
/* oklch */ color: oklch(35.2% 0.120 313.8);
Tailwind
colors: {
  custom: {
    50: '#846092',
    500: '#512266',
    950: '#000000',
  },
}
SCSS
$custom: #512266;
$custom-light: #846092;
$custom-dark: #000000;
JSON
{
  "hex": "#512266",
  "rgb": {
    "r": 81,
    "g": 34,
    "b": 102
  },
  "hsl": {
    "h": 281.471,
    "s": 50,
    "l": 26.667
  },
  "oklch": {
    "l": 0.35248,
    "c": 0.12023,
    "h": 313.8
  },
  "luminance": 0.03853
}

Semantic roles & 50–950 ramp

primary
#512266
secondary
#639A4A
accent
#DA4E79
background
#F8F5F9
surface
#EFEAF1
border
#CAC6CB
text
#0B050D
muted
#7C797E

Preview Lab

Preview with #512266

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

Preview Lab → · Contrast checker → · Palette generator →

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