#5F309B#5F309B

#5F309B is a dark, vivid violet. Relative luminance 0.069; OKLCH L 43.0% C 0.165 H 299.5°. Best body text is #FFFFFF at 8.81:1 contrast (WCAG AA passes).

Color values

HEX#5F309B
RGBrgb(95, 48, 155)
HSLhsl(266, 53%, 40%)
HSVhsv(266, 69%, 61%)
CMYKcmyk(38.7%, 69%, 0%, 39.2%)
CIE-LABlab(31.61, 43.45, -50.50)
CIE-LCHlch(31.61, 66.62, 310.71°)
OKLaboklab(42.95% 0.0814 -0.144)
OKLCHoklch(42.95% 0.165 299.5)
XYZxyz(11.6912, 6.9132, 31.7224)
Luminance0.0691 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F309B #6C9B30
analogous
#30379B #5F309B #94309B
triadic
#5F309B #9B5F30 #309B5F
tetradic
#5F309B #9B3037 #6C9B30 #309B94
square
#5F309B #9B3037 #6C9B30 #309B94
split-complementary
#5F309B #9B9430 #379B30
monochromatic
#26133E #42226C #5F309B #7C43C5 #9D72D3

Accessibility & contrast

On white

8.81
#5F309B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.38
#5F309B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F309B
8.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F309B#FFFFFF#000000##FFFFFF
##5F309B1.008.812.388.81
#FFFFFF8.811.0021.001.00
#0000002.3821.001.0021.00
##FFFFFF8.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004A9E
Deuteranopia (green-blind)
#004999
Tritanopia (blue-blind)
#514961
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #5f309b;
/* rgb */ color: rgb(95, 48, 155);
/* oklch */ color: oklch(43.0% 0.165 299.5);
Tailwind
colors: {
  custom: {
    50: '#916cb9',
    500: '#5f309b',
    950: '#000000',
  },
}
SCSS
$custom: #5f309b;
$custom-light: #916cb9;
$custom-dark: #000000;
JSON
{
  "hex": "#5f309b",
  "rgb": {
    "r": 95,
    "g": 48,
    "b": 155
  },
  "hsl": {
    "h": 266.355,
    "s": 52.709,
    "l": 39.804
  },
  "oklch": {
    "l": 0.42951,
    "c": 0.16536,
    "h": 299.5
  },
  "luminance": 0.06913
}

Semantic roles & 50–950 ramp

primary
#5F309B
secondary
#98BB6C
accent
#DC4C9D
background
#F9F6FB
surface
#F2EBF6
border
#CCC6D0
text
#0D0712
muted
#7E7A81

Preview Lab

Preview with #5F309B

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

Preview Lab → · Contrast checker → · Palette generator →

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