#51227C#51227C

#51227C is a dark, vivid violet. Relative luminance 0.043; OKLCH L 36.9% C 0.145 H 303.9°. Best body text is #FFFFFF at 11.23:1 contrast (WCAG AA passes).

Color values

HEX#51227C
RGBrgb(81, 34, 124)
HSLhsl(271, 57%, 31%)
HSVhsv(271, 73%, 49%)
CMYKcmyk(34.7%, 72.6%, 0%, 51.4%)
CIE-LABlab(24.79, 39.61, -42.41)
CIE-LCHlch(24.79, 58.03, 313.04°)
OKLaboklab(36.92% 0.0811 -0.1206)
OKLCHoklch(36.92% 0.145 303.9)
XYZxyz(7.6026, 4.3486, 19.5037)
Luminance0.0435 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51227C #4D7C22
analogous
#24227C #51227C #7C227A
triadic
#51227C #7C5122 #227C51
tetradic
#51227C #7C2422 #4D7C22 #227A7C
square
#51227C #7C2422 #4D7C22 #227A7C
split-complementary
#51227C #7A7C22 #227C24
monochromatic
#12081C #32154C #51227C #702FAC #8F4BCE

Accessibility & contrast

On white

11.23
#51227C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #51227C
11.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51227C#FFFFFF#000000##FFFFFF
##51227C1.0011.231.8711.23
#FFFFFF11.231.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.231.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A7F
Deuteranopia (green-blind)
#003B7A
Tritanopia (blue-blind)
#49374C
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #51227c;
/* rgb */ color: rgb(81, 34, 124);
/* oklch */ color: oklch(36.9% 0.145 303.9);
Tailwind
colors: {
  custom: {
    50: '#8661a3',
    500: '#51227c',
    950: '#000000',
  },
}
SCSS
$custom: #51227c;
$custom-light: #8661a3;
$custom-dark: #000000;
JSON
{
  "hex": "#51227c",
  "rgb": {
    "r": 81,
    "g": 34,
    "b": 124
  },
  "hsl": {
    "h": 271.333,
    "s": 56.962,
    "l": 30.98
  },
  "oklch": {
    "l": 0.36919,
    "c": 0.14535,
    "h": 303.9
  },
  "luminance": 0.04349
}

Semantic roles & 50–950 ramp

primary
#51227C
secondary
#7BAF4B
accent
#E04891
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C050F
muted
#7D797F

Preview Lab

Preview with #51227C

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

Preview Lab → · Contrast checker → · Palette generator →

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