#51228A#51228A

#51228A is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.1% C 0.161 H 299.1°. Best body text is #FFFFFF at 10.79:1 contrast (WCAG AA passes).

Color values

HEX#51228A
RGBrgb(81, 34, 138)
HSLhsl(267, 60%, 34%)
HSVhsv(267, 75%, 54%)
CMYKcmyk(41.3%, 75.4%, 0%, 45.9%)
CIE-LABlab(25.95, 43.24, -49.33)
CIE-LCHlch(25.95, 65.60, 311.24°)
OKLaboklab(38.1% 0.0783 -0.1409)
OKLCHoklch(38.1% 0.161 299.1)
XYZxyz(8.5516, 4.7283, 24.5019)
Luminance0.0473 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51228A #5B8A22
analogous
#22278A #51228A #85228A
triadic
#51228A #8A5122 #228A51
tetradic
#51228A #8A2227 #5B8A22 #228A85
square
#51228A #8A2227 #5B8A22 #228A85
split-complementary
#51228A #8A8522 #278A22
monochromatic
#170A28 #341659 #51228A #6E2EBB #8D52D4

Accessibility & contrast

On white

10.79
#51228A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #51228A
10.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51228A#FFFFFF#000000##FFFFFF
##51228A1.0010.791.9510.79
#FFFFFF10.791.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D8D
Deuteranopia (green-blind)
#003C88
Tritanopia (blue-blind)
#433D54
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #51228a;
/* rgb */ color: rgb(81, 34, 138);
/* oklch */ color: oklch(38.1% 0.161 299.1);
Tailwind
colors: {
  custom: {
    50: '#8762ad',
    500: '#51228a',
    950: '#000000',
  },
}
SCSS
$custom: #51228a;
$custom-light: #8762ad;
$custom-dark: #000000;
JSON
{
  "hex": "#51228a",
  "rgb": {
    "r": 81,
    "g": 34,
    "b": 138
  },
  "hsl": {
    "h": 267.115,
    "s": 60.465,
    "l": 33.725
  },
  "oklch": {
    "l": 0.38099,
    "c": 0.16124,
    "h": 299.1
  },
  "luminance": 0.04728
}

Semantic roles & 50–950 ramp

primary
#51228A
secondary
#89B850
accent
#E4449C
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0510
muted
#7D7A7F

Preview Lab

Preview with #51228A

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

Preview Lab → · Contrast checker → · Palette generator →

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