#5F228B#5F228B

#5F228B is a dark, vivid violet. Relative luminance 0.054; OKLCH L 40.0% C 0.165 H 306.8°. Best body text is #FFFFFF at 10.06:1 contrast (WCAG AA passes).

Color values

HEX#5F228B
RGBrgb(95, 34, 139)
HSLhsl(275, 61%, 34%)
HSVhsv(275, 76%, 55%)
CMYKcmyk(31.7%, 75.5%, 0%, 45.5%)
CIE-LABlab(27.96, 46.19, -46.60)
CIE-LCHlch(27.96, 65.61, 314.75°)
OKLaboklab(39.96% 0.0989 -0.1324)
OKLCHoklch(39.96% 0.165 306.8)
XYZxyz(9.9505, 5.4411, 24.9471)
Luminance0.0544 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F228B #4E8B22
analogous
#2B228B #5F228B #8B2283
triadic
#5F228B #8B5F22 #228B5F
tetradic
#5F228B #8B2B22 #4E8B22 #22838B
square
#5F228B #8B2B22 #4E8B22 #22838B
split-complementary
#5F228B #838B22 #228B2B
monochromatic
#1C0A29 #3D165A #5F228B #812EBC #9E53D5

Accessibility & contrast

On white

10.06
#5F228B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#5F228B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F228B
10.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F228B#FFFFFF#000000##FFFFFF
##5F228B1.0010.062.0910.06
#FFFFFF10.061.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00408E
Deuteranopia (green-blind)
#004289
Tritanopia (blue-blind)
#573B55
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #5f228b;
/* rgb */ color: rgb(95, 34, 139);
/* oklch */ color: oklch(40.0% 0.165 306.8);
Tailwind
colors: {
  custom: {
    50: '#9163ae',
    500: '#5f228b',
    950: '#000000',
  },
}
SCSS
$custom: #5f228b;
$custom-light: #9163ae;
$custom-dark: #000000;
JSON
{
  "hex": "#5f228b",
  "rgb": {
    "r": 95,
    "g": 34,
    "b": 139
  },
  "hsl": {
    "h": 274.857,
    "s": 60.694,
    "l": 33.922
  },
  "oklch": {
    "l": 0.39961,
    "c": 0.16524,
    "h": 306.8
  },
  "luminance": 0.05441
}

Semantic roles & 50–950 ramp

primary
#5F228B
secondary
#7CB850
accent
#E44487
background
#F9F6FA
surface
#F2EBF4
border
#CCC6CE
text
#0D0610
muted
#7E7A7F

Preview Lab

Preview with #5F228B

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

Preview Lab → · Contrast checker → · Palette generator →

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