#51227E#51227E

#51227E is a dark, vivid violet. Relative luminance 0.044; OKLCH L 37.1% C 0.148 H 303.2°. Best body text is #FFFFFF at 11.17:1 contrast (WCAG AA passes).

Color values

HEX#51227E
RGBrgb(81, 34, 126)
HSLhsl(271, 58%, 31%)
HSVhsv(271, 73%, 49%)
CMYKcmyk(35.7%, 73%, 0%, 50.6%)
CIE-LABlab(24.95, 40.12, -43.42)
CIE-LCHlch(24.95, 59.12, 312.74°)
OKLaboklab(37.08% 0.0808 -0.1236)
OKLCHoklch(37.08% 0.148 303.2)
XYZxyz(7.7304, 4.3997, 20.1766)
Luminance0.0440 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51227E #4F7E22
analogous
#23227E #51227E #7E227D
triadic
#51227E #7E5122 #227E51
tetradic
#51227E #7E2322 #4F7E22 #227D7E
square
#51227E #7E2322 #4F7E22 #227D7E
split-complementary
#51227E #7D7E22 #227E23
monochromatic
#13081E #32154E #51227E #702FAE #8F4CCF

Accessibility & contrast

On white

11.17
#51227E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.88
#51227E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51227E
11.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51227E#FFFFFF#000000##FFFFFF
##51227E1.0011.171.8811.17
#FFFFFF11.171.0021.001.00
#0000001.8821.001.0021.00
##FFFFFF11.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A81
Deuteranopia (green-blind)
#003B7C
Tritanopia (blue-blind)
#48384D
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #51227e;
/* rgb */ color: rgb(81, 34, 126);
/* oklch */ color: oklch(37.1% 0.148 303.2);
Tailwind
colors: {
  custom: {
    50: '#8661a4',
    500: '#51227e',
    950: '#000000',
  },
}
SCSS
$custom: #51227e;
$custom-light: #8661a4;
$custom-dark: #000000;
JSON
{
  "hex": "#51227e",
  "rgb": {
    "r": 81,
    "g": 34,
    "b": 126
  },
  "hsl": {
    "h": 270.652,
    "s": 57.5,
    "l": 31.373
  },
  "oklch": {
    "l": 0.37083,
    "c": 0.14763,
    "h": 303.2
  },
  "luminance": 0.044
}

Semantic roles & 50–950 ramp

primary
#51227E
secondary
#7DB14B
accent
#E14792
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C050F
muted
#7D797F

Preview Lab

Preview with #51227E

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

Preview Lab → · Contrast checker → · Palette generator →

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