#51228F#51228F

#51228F is a dark, vivid violet. Relative luminance 0.049; OKLCH L 38.5% C 0.167 H 297.5°. Best body text is #FFFFFF at 10.63:1 contrast (WCAG AA passes).

Color values

HEX#51228F
RGBrgb(81, 34, 143)
HSLhsl(266, 62%, 35%)
HSVhsv(266, 76%, 56%)
CMYKcmyk(43.4%, 76.2%, 0%, 43.9%)
CIE-LABlab(26.38, 44.57, -51.73)
CIE-LCHlch(26.38, 68.28, 310.75°)
OKLaboklab(38.54% 0.0771 -0.148)
OKLCHoklch(38.54% 0.167 297.5)
XYZxyz(8.9220, 4.8764, 26.4524)
Luminance0.0488 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51228F #608F22
analogous
#22298F #51228F #88228F
triadic
#51228F #8F5122 #228F51
tetradic
#51228F #8F2229 #608F22 #228F88
square
#51228F #8F2229 #608F22 #228F88
split-complementary
#51228F #8F8822 #298F22
monochromatic
#190A2C #35165E #51228F #6D2EC0 #8D55D7

Accessibility & contrast

On white

10.63
#51228F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.98
#51228F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51228F
10.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51228F#FFFFFF#000000##FFFFFF
##51228F1.0010.631.9810.63
#FFFFFF10.631.0021.001.00
#0000001.9821.001.0021.00
##FFFFFF10.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F92
Deuteranopia (green-blind)
#003D8D
Tritanopia (blue-blind)
#413F57
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #51228f;
/* rgb */ color: rgb(81, 34, 143);
/* oklch */ color: oklch(38.5% 0.167 297.5);
Tailwind
colors: {
  custom: {
    50: '#8862b1',
    500: '#51228f',
    950: '#000000',
  },
}
SCSS
$custom: #51228f;
$custom-light: #8862b1;
$custom-dark: #000000;
JSON
{
  "hex": "#51228f",
  "rgb": {
    "r": 81,
    "g": 34,
    "b": 143
  },
  "hsl": {
    "h": 265.872,
    "s": 61.582,
    "l": 34.706
  },
  "oklch": {
    "l": 0.38539,
    "c": 0.16687,
    "h": 297.5
  },
  "luminance": 0.04877
}

Semantic roles & 50–950 ramp

primary
#51228F
secondary
#8EBA52
accent
#E5439F
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0511
muted
#7D7A80

Preview Lab

Preview with #51228F

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

Preview Lab → · Contrast checker → · Palette generator →

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