#5A227F#5A227F

#5A227F is a dark, vivid violet. Relative luminance 0.049; OKLCH L 38.3% C 0.151 H 308.4°. Best body text is #FFFFFF at 10.66:1 contrast (WCAG AA passes).

Color values

HEX#5A227F
RGBrgb(90, 34, 127)
HSLhsl(276, 58%, 32%)
HSVhsv(276, 73%, 50%)
CMYKcmyk(29.1%, 73.2%, 0%, 50.2%)
CIE-LABlab(26.30, 42.29, -41.80)
CIE-LCHlch(26.30, 59.46, 315.33°)
OKLaboklab(38.34% 0.0938 -0.1185)
OKLCHoklch(38.34% 0.151 308.4)
XYZxyz(8.6185, 4.8502, 20.5567)
Luminance0.0485 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A227F #477F22
analogous
#2C227F #5A227F #7F2276
triadic
#5A227F #7F5A22 #227F5A
tetradic
#5A227F #7F2C22 #477F22 #22767F
square
#5A227F #7F2C22 #477F22 #22767F
split-complementary
#5A227F #767F22 #227F2C
monochromatic
#16081E #38154F #5A227F #7C2FAF #9B4CCF

Accessibility & contrast

On white

10.66
#5A227F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.97
#5A227F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A227F
10.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A227F#FFFFFF#000000##FFFFFF
##5A227F1.0010.661.9710.66
#FFFFFF10.661.0021.001.00
#0000001.9721.001.0021.00
##FFFFFF10.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C82
Deuteranopia (green-blind)
#0A3F7D
Tritanopia (blue-blind)
#54374E
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #5a227f;
/* rgb */ color: rgb(90, 34, 127);
/* oklch */ color: oklch(38.3% 0.151 308.4);
Tailwind
colors: {
  custom: {
    50: '#8c62a5',
    500: '#5a227f',
    950: '#000000',
  },
}
SCSS
$custom: #5a227f;
$custom-light: #8c62a5;
$custom-dark: #000000;
JSON
{
  "hex": "#5a227f",
  "rgb": {
    "r": 90,
    "g": 34,
    "b": 127
  },
  "hsl": {
    "h": 276.129,
    "s": 57.764,
    "l": 31.569
  },
  "oklch": {
    "l": 0.38343,
    "c": 0.1511,
    "h": 308.4
  },
  "luminance": 0.0485
}

Semantic roles & 50–950 ramp

primary
#5A227F
secondary
#74B24B
accent
#E14784
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C050F
muted
#7D7A7F

Preview Lab

Preview with #5A227F

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

Preview Lab → · Contrast checker → · Palette generator →

#5A227F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva