#5F2198#5F2198

#5F2198 is a dark, vivid violet. Relative luminance 0.058; OKLCH L 40.9% C 0.180 H 302.6°. Best body text is #FFFFFF at 9.73:1 contrast (WCAG AA passes).

Color values

HEX#5F2198
RGBrgb(95, 33, 152)
HSLhsl(271, 64%, 36%)
HSVhsv(271, 78%, 60%)
CMYKcmyk(37.5%, 78.3%, 0%, 40.4%)
CIE-LABlab(28.87, 49.73, -53.13)
CIE-LCHlch(28.87, 72.77, 313.11°)
OKLaboklab(40.94% 0.0968 -0.1516)
OKLCHoklch(40.94% 0.18 302.6)
XYZxyz(10.9293, 5.7876, 30.2410)
Luminance0.0579 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F2198 #5A9821
analogous
#242198 #5F2198 #982196
triadic
#5F2198 #985F21 #21985F
tetradic
#5F2198 #982421 #5A9821 #219698
square
#5F2198 #982421 #5A9821 #219698
split-complementary
#5F2198 #969821 #219824
monochromatic
#200B33 #401666 #5F2198 #7E2CCA #9C59DB

Accessibility & contrast

On white

9.73
#5F2198 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.16
#5F2198 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F2198
9.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F2198#FFFFFF#000000##FFFFFF
##5F21981.009.732.169.73
#FFFFFF9.731.0021.001.00
#0000002.1621.001.0021.00
##FFFFFF9.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00439B
Deuteranopia (green-blind)
#004496
Tritanopia (blue-blind)
#53405C
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #5f2198;
/* rgb */ color: rgb(95, 33, 152);
/* oklch */ color: oklch(40.9% 0.180 302.6);
Tailwind
colors: {
  custom: {
    50: '#9264b7',
    500: '#5f2198',
    950: '#000000',
  },
}
SCSS
$custom: #5f2198;
$custom-light: #9264b7;
$custom-dark: #000000;
JSON
{
  "hex": "#5f2198",
  "rgb": {
    "r": 95,
    "g": 33,
    "b": 152
  },
  "hsl": {
    "h": 271.261,
    "s": 64.324,
    "l": 36.275
  },
  "oklch": {
    "l": 0.40935,
    "c": 0.17987,
    "h": 302.6
  },
  "luminance": 0.05788
}

Semantic roles & 50–950 ramp

primary
#5F2198
secondary
#88BF56
accent
#E74090
background
#F9F6FB
surface
#F2EBF6
border
#CCC6D0
text
#0E0611
muted
#7E7A80

Preview Lab

Preview with #5F2198

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

Preview Lab → · Contrast checker → · Palette generator →

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