#5F238D#5F238D

#5F238D is a dark, vivid violet. Relative luminance 0.056; OKLCH L 40.2% C 0.166 H 305.9°. Best body text is #FFFFFF at 9.95:1 contrast (WCAG AA passes).

Color values

HEX#5F238D
RGBrgb(95, 35, 141)
HSLhsl(274, 60%, 35%)
HSVhsv(274, 75%, 55%)
CMYKcmyk(32.6%, 75.2%, 0%, 44.7%)
CIE-LABlab(28.27, 46.22, -47.33)
CIE-LCHlch(28.27, 66.16, 314.32°)
OKLaboklab(40.23% 0.0975 -0.1346)
OKLCHoklch(40.23% 0.166 305.9)
XYZxyz(10.1270, 5.5581, 25.7335)
Luminance0.0556 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F238D #518D23
analogous
#2A238D #5F238D #8D2386
triadic
#5F238D #8D5F23 #238D5F
tetradic
#5F238D #8D2A23 #518D23 #23868D
square
#5F238D #8D2A23 #518D23 #23868D
split-complementary
#5F238D #868D23 #238D2A
monochromatic
#1D0B2B #3E175C #5F238D #802FBE #9E55D5

Accessibility & contrast

On white

9.95
#5F238D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5F238D
9.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F238D#FFFFFF#000000##FFFFFF
##5F238D1.009.952.119.95
#FFFFFF9.951.0021.001.00
#0000002.1121.001.0021.00
##FFFFFF9.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004190
Deuteranopia (green-blind)
#00438B
Tritanopia (blue-blind)
#573D56
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #5f238d;
/* rgb */ color: rgb(95, 35, 141);
/* oklch */ color: oklch(40.2% 0.166 305.9);
Tailwind
colors: {
  custom: {
    50: '#9164af',
    500: '#5f238d',
    950: '#000000',
  },
}
SCSS
$custom: #5f238d;
$custom-light: #9164af;
$custom-dark: #000000;
JSON
{
  "hex": "#5f238d",
  "rgb": {
    "r": 95,
    "g": 35,
    "b": 141
  },
  "hsl": {
    "h": 273.962,
    "s": 60.227,
    "l": 34.51
  },
  "oklch": {
    "l": 0.40231,
    "c": 0.16616,
    "h": 305.9
  },
  "luminance": 0.05558
}

Semantic roles & 50–950 ramp

primary
#5F238D
secondary
#7FB953
accent
#E34489
background
#F9F6FA
surface
#F2EBF5
border
#CCC6CF
text
#0D0610
muted
#7E7A7F

Preview Lab

Preview with #5F238D

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

Preview Lab → · Contrast checker → · Palette generator →

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