#51228E#51228E

#51228E is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.5% C 0.166 H 297.8°. Best body text is #FFFFFF at 10.66:1 contrast (WCAG AA passes).

Color values

HEX#51228E
RGBrgb(81, 34, 142)
HSLhsl(266, 61%, 35%)
HSVhsv(266, 76%, 56%)
CMYKcmyk(43%, 76.1%, 0%, 44.3%)
CIE-LABlab(26.29, 44.30, -51.25)
CIE-LCHlch(26.29, 67.74, 310.84°)
OKLaboklab(38.45% 0.0774 -0.1466)
OKLCHoklch(38.45% 0.166 297.8)
XYZxyz(8.8466, 4.8462, 26.0553)
Luminance0.0485 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51228E #5F8E22
analogous
#22298E #51228E #87228E
triadic
#51228E #8E5122 #228E51
tetradic
#51228E #8E2229 #5F8E22 #228E87
square
#51228E #8E2229 #5F8E22 #228E87
split-complementary
#51228E #8E8722 #298E22
monochromatic
#190A2B #35165D #51228E #6D2EBF #8D54D6

Accessibility & contrast

On white

10.66
#51228E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.97
#51228E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51228E
10.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51228E#FFFFFF#000000##FFFFFF
##51228E1.0010.661.9710.66
#FFFFFF10.661.0021.001.00
#0000001.9721.001.0021.00
##FFFFFF10.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E91
Deuteranopia (green-blind)
#003D8C
Tritanopia (blue-blind)
#423E56
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #51228e;
/* rgb */ color: rgb(81, 34, 142);
/* oklch */ color: oklch(38.5% 0.166 297.8);
Tailwind
colors: {
  custom: {
    50: '#8862b0',
    500: '#51228e',
    950: '#000000',
  },
}
SCSS
$custom: #51228e;
$custom-light: #8862b0;
$custom-dark: #000000;
JSON
{
  "hex": "#51228e",
  "rgb": {
    "r": 81,
    "g": 34,
    "b": 142
  },
  "hsl": {
    "h": 266.111,
    "s": 61.364,
    "l": 34.51
  },
  "oklch": {
    "l": 0.3845,
    "c": 0.16575,
    "h": 297.8
  },
  "luminance": 0.04846
}

Semantic roles & 50–950 ramp

primary
#51228E
secondary
#8DBA52
accent
#E4439E
background
#F8F6FA
surface
#F0EBF5
border
#CBC6CF
text
#0C0511
muted
#7D7A80

Preview Lab

Preview with #51228E

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

Preview Lab → · Contrast checker → · Palette generator →

#51228E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva