#5F227B#5F227B

#5F227B is a dark, vivid purple. Relative luminance 0.050; OKLCH L 38.7% C 0.149 H 313.0°. Best body text is #FFFFFF at 10.49:1 contrast (WCAG AA passes).

Color values

HEX#5F227B
RGBrgb(95, 34, 123)
HSLhsl(281, 57%, 31%)
HSVhsv(281, 72%, 48%)
CMYKcmyk(22.8%, 72.4%, 0%, 51.8%)
CIE-LABlab(26.76, 42.47, -38.50)
CIE-LCHlch(26.76, 57.32, 317.80°)
OKLaboklab(38.73% 0.1013 -0.1086)
OKLCHoklch(38.73% 0.149 313)
XYZxyz(8.8659, 5.0073, 19.2345)
Luminance0.0501 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F227B #3E7B22
analogous
#33227B #5F227B #7B226A
triadic
#5F227B #7B5F22 #227B5F
tetradic
#5F227B #7B3322 #3E7B22 #226A7B
square
#5F227B #7B3322 #3E7B22 #226A7B
split-complementary
#5F227B #6A7B22 #227B33
monochromatic
#15071B #3A154B #5F227B #842FAB #A44ACD

Accessibility & contrast

On white

10.49
#5F227B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.00
#5F227B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F227B
10.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F227B#FFFFFF#000000##FFFFFF
##5F227B1.0010.492.0010.49
#FFFFFF10.491.0021.001.00
#0000002.0021.001.0021.00
##FFFFFF10.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C7E
Deuteranopia (green-blind)
#1B4179
Tritanopia (blue-blind)
#5C354C
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #5f227b;
/* rgb */ color: rgb(95, 34, 123);
/* oklch */ color: oklch(38.7% 0.149 313.0);
Tailwind
colors: {
  custom: {
    50: '#9063a2',
    500: '#5f227b',
    950: '#000000',
  },
}
SCSS
$custom: #5f227b;
$custom-light: #9063a2;
$custom-dark: #000000;
JSON
{
  "hex": "#5f227b",
  "rgb": {
    "r": 95,
    "g": 34,
    "b": 123
  },
  "hsl": {
    "h": 281.124,
    "s": 56.688,
    "l": 30.784
  },
  "oklch": {
    "l": 0.38728,
    "c": 0.14855,
    "h": 313
  },
  "luminance": 0.05007
}

Semantic roles & 50–950 ramp

primary
#5F227B
secondary
#6AAE4B
accent
#E04878
background
#F9F6FA
surface
#F1EBF3
border
#CBC6CD
text
#0D050F
muted
#7E7A7F

Preview Lab

Preview with #5F227B

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

Preview Lab → · Contrast checker → · Palette generator →

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