#5F228E#5F228E

#5F228E is a dark, vivid violet. Relative luminance 0.055; OKLCH L 40.2% C 0.168 H 305.7°. Best body text is #FFFFFF at 9.97:1 contrast (WCAG AA passes).

Color values

HEX#5F228E
RGBrgb(95, 34, 142)
HSLhsl(274, 61%, 35%)
HSVhsv(274, 76%, 56%)
CMYKcmyk(33.1%, 76.1%, 0%, 44.3%)
CIE-LABlab(28.19, 46.90, -48.07)
CIE-LCHlch(28.19, 67.16, 314.30°)
OKLaboklab(40.2% 0.0983 -0.1367)
OKLCHoklch(40.2% 0.168 305.7)
XYZxyz(10.1727, 5.5300, 26.1174)
Luminance0.0553 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F228E #518E22
analogous
#29228E #5F228E #8E2287
triadic
#5F228E #8E5F22 #228E5F
tetradic
#5F228E #8E2922 #518E22 #22878E
square
#5F228E #8E2922 #518E22 #22878E
split-complementary
#5F228E #878E22 #228E29
monochromatic
#1D0A2B #3E165D #5F228E #802EBF #9E54D6

Accessibility & contrast

On white

9.97
#5F228E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.11
#5F228E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F228E
9.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F228E#FFFFFF#000000##FFFFFF
##5F228E1.009.972.119.97
#FFFFFF9.971.0021.001.00
#0000002.1121.001.0021.00
##FFFFFF9.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004191
Deuteranopia (green-blind)
#00438C
Tritanopia (blue-blind)
#563C56
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #5f228e;
/* rgb */ color: rgb(95, 34, 142);
/* oklch */ color: oklch(40.2% 0.168 305.7);
Tailwind
colors: {
  custom: {
    50: '#9164b0',
    500: '#5f228e',
    950: '#000000',
  },
}
SCSS
$custom: #5f228e;
$custom-light: #9164b0;
$custom-dark: #000000;
JSON
{
  "hex": "#5f228e",
  "rgb": {
    "r": 95,
    "g": 34,
    "b": 142
  },
  "hsl": {
    "h": 273.889,
    "s": 61.364,
    "l": 34.51
  },
  "oklch": {
    "l": 0.40204,
    "c": 0.16838,
    "h": 305.7
  },
  "luminance": 0.0553
}

Semantic roles & 50–950 ramp

primary
#5F228E
secondary
#7FBA52
accent
#E44389
background
#F9F6FA
surface
#F2EBF5
border
#CCC6CF
text
#0D0610
muted
#7E7A7F

Preview Lab

Preview with #5F228E

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

Preview Lab → · Contrast checker → · Palette generator →

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