#51227D#51227D

#51227D is a dark, vivid violet. Relative luminance 0.044; OKLCH L 37.0% C 0.146 H 303.5°. Best body text is #FFFFFF at 11.20:1 contrast (WCAG AA passes).

Color values

HEX#51227D
RGBrgb(81, 34, 125)
HSLhsl(271, 57%, 31%)
HSVhsv(271, 73%, 49%)
CMYKcmyk(35.2%, 72.8%, 0%, 51%)
CIE-LABlab(24.87, 39.86, -42.91)
CIE-LCHlch(24.87, 58.57, 312.89°)
OKLaboklab(37% 0.0809 -0.1221)
OKLCHoklch(37% 0.146 303.5)
XYZxyz(7.6662, 4.3741, 19.8385)
Luminance0.0437 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51227D #4E7D22
analogous
#23227D #51227D #7D227B
triadic
#51227D #7D5122 #227D51
tetradic
#51227D #7D2322 #4E7D22 #227B7D
square
#51227D #7D2322 #4E7D22 #227B7D
split-complementary
#51227D #7B7D22 #227D23
monochromatic
#13081D #32154D #51227D #702FAD #8F4BCE

Accessibility & contrast

On white

11.20
#51227D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#51227D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51227D
11.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51227D#FFFFFF#000000##FFFFFF
##51227D1.0011.201.8711.20
#FFFFFF11.201.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A80
Deuteranopia (green-blind)
#003B7B
Tritanopia (blue-blind)
#48374D
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #51227d;
/* rgb */ color: rgb(81, 34, 125);
/* oklch */ color: oklch(37.0% 0.146 303.5);
Tailwind
colors: {
  custom: {
    50: '#8661a3',
    500: '#51227d',
    950: '#000000',
  },
}
SCSS
$custom: #51227d;
$custom-light: #8661a3;
$custom-dark: #000000;
JSON
{
  "hex": "#51227d",
  "rgb": {
    "r": 81,
    "g": 34,
    "b": 125
  },
  "hsl": {
    "h": 270.989,
    "s": 57.233,
    "l": 31.176
  },
  "oklch": {
    "l": 0.37001,
    "c": 0.14649,
    "h": 303.5
  },
  "luminance": 0.04374
}

Semantic roles & 50–950 ramp

primary
#51227D
secondary
#7CB04B
accent
#E04791
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C050F
muted
#7D797F

Preview Lab

Preview with #51227D

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

Preview Lab → · Contrast checker → · Palette generator →

#51227D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva