#51228C#51228C

#51228C is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.3% C 0.163 H 298.4°. Best body text is #FFFFFF at 10.73:1 contrast (WCAG AA passes).

Color values

HEX#51228C
RGBrgb(81, 34, 140)
HSLhsl(267, 61%, 34%)
HSVhsv(267, 76%, 55%)
CMYKcmyk(42.1%, 75.7%, 0%, 45.1%)
CIE-LABlab(26.12, 43.77, -50.29)
CIE-LCHlch(26.12, 66.67, 311.04°)
OKLaboklab(38.27% 0.0779 -0.1438)
OKLCHoklch(38.27% 0.163 298.4)
XYZxyz(8.6978, 4.7867, 25.2715)
Luminance0.0479 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51228C #5D8C22
analogous
#22288C #51228C #86228C
triadic
#51228C #8C5122 #228C51
tetradic
#51228C #8C2228 #5D8C22 #228C86
square
#51228C #8C2228 #5D8C22 #228C86
split-complementary
#51228C #8C8622 #288C22
monochromatic
#180A2A #35165B #51228C #6D2EBD #8D53D5

Accessibility & contrast

On white

10.73
#51228C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#51228C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51228C
10.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51228C#FFFFFF#000000##FFFFFF
##51228C1.0010.731.9610.73
#FFFFFF10.731.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E8F
Deuteranopia (green-blind)
#003D8A
Tritanopia (blue-blind)
#423D55
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #51228c;
/* rgb */ color: rgb(81, 34, 140);
/* oklch */ color: oklch(38.3% 0.163 298.4);
Tailwind
colors: {
  custom: {
    50: '#8862ae',
    500: '#51228c',
    950: '#000000',
  },
}
SCSS
$custom: #51228c;
$custom-light: #8862ae;
$custom-dark: #000000;
JSON
{
  "hex": "#51228c",
  "rgb": {
    "r": 81,
    "g": 34,
    "b": 140
  },
  "hsl": {
    "h": 266.604,
    "s": 60.92,
    "l": 34.118
  },
  "oklch": {
    "l": 0.38274,
    "c": 0.16349,
    "h": 298.4
  },
  "luminance": 0.04787
}

Semantic roles & 50–950 ramp

primary
#51228C
secondary
#8BB951
accent
#E4449D
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0510
muted
#7D7A7F

Preview Lab

Preview with #51228C

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

Preview Lab → · Contrast checker → · Palette generator →

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