#51228B#51228B

#51228B is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.2% C 0.162 H 298.7°. Best body text is #FFFFFF at 10.76:1 contrast (WCAG AA passes).

Color values

HEX#51228B
RGBrgb(81, 34, 139)
HSLhsl(267, 61%, 34%)
HSVhsv(267, 76%, 55%)
CMYKcmyk(41.7%, 75.5%, 0%, 45.5%)
CIE-LABlab(26.03, 43.51, -49.81)
CIE-LCHlch(26.03, 66.14, 311.14°)
OKLaboklab(38.19% 0.0781 -0.1424)
OKLCHoklch(38.19% 0.162 298.7)
XYZxyz(8.6244, 4.7573, 24.8850)
Luminance0.0476 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51228B #5C8B22
analogous
#22288B #51228B #86228B
triadic
#51228B #8B5122 #228B51
tetradic
#51228B #8B2228 #5C8B22 #228B86
square
#51228B #8B2228 #5C8B22 #228B86
split-complementary
#51228B #8B8622 #288B22
monochromatic
#180A29 #34165A #51228B #6E2EBC #8D53D5

Accessibility & contrast

On white

10.76
#51228B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#51228B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51228B
10.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51228B#FFFFFF#000000##FFFFFF
##51228B1.0010.761.9510.76
#FFFFFF10.761.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E8E
Deuteranopia (green-blind)
#003D89
Tritanopia (blue-blind)
#433D55
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #51228b;
/* rgb */ color: rgb(81, 34, 139);
/* oklch */ color: oklch(38.2% 0.162 298.7);
Tailwind
colors: {
  custom: {
    50: '#8862ae',
    500: '#51228b',
    950: '#000000',
  },
}
SCSS
$custom: #51228b;
$custom-light: #8862ae;
$custom-dark: #000000;
JSON
{
  "hex": "#51228b",
  "rgb": {
    "r": 81,
    "g": 34,
    "b": 139
  },
  "hsl": {
    "h": 266.857,
    "s": 60.694,
    "l": 33.922
  },
  "oklch": {
    "l": 0.38186,
    "c": 0.16237,
    "h": 298.7
  },
  "luminance": 0.04757
}

Semantic roles & 50–950 ramp

primary
#51228B
secondary
#8AB850
accent
#E4449C
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0510
muted
#7D7A7F

Preview Lab

Preview with #51228B

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

Preview Lab → · Contrast checker → · Palette generator →

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