#5B309F#5B309F

#5B309F is a dark, vivid violet. Relative luminance 0.068; OKLCH L 42.8% C 0.170 H 296.2°. Best body text is #FFFFFF at 8.87:1 contrast (WCAG AA passes).

Color values

HEX#5B309F
RGBrgb(91, 48, 159)
HSLhsl(263, 54%, 41%)
HSVhsv(263, 70%, 62%)
CMYKcmyk(42.8%, 69.8%, 0%, 37.6%)
CIE-LABlab(31.44, 43.72, -53.22)
CIE-LCHlch(31.44, 68.88, 309.40°)
OKLaboklab(42.82% 0.0749 -0.1521)
OKLCHoklch(42.82% 0.17 296.2)
XYZxyz(11.6277, 6.8410, 33.5020)
Luminance0.0684 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B309F #749F30
analogous
#303D9F #5B309F #92309F
triadic
#5B309F #9F5B30 #309F5B
tetradic
#5B309F #9F303D #749F30 #309F92
square
#5B309F #9F303D #749F30 #309F92
split-complementary
#5B309F #9F9230 #3D9F30
monochromatic
#251441 #402270 #5B309F #7745C7 #9A74D5

Accessibility & contrast

On white

8.87
#5B309F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.37
#5B309F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B309F
8.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B309F#FFFFFF#000000##FFFFFF
##5B309F1.008.872.378.87
#FFFFFF8.871.0021.001.00
#0000002.3721.001.0021.00
##FFFFFF8.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BA2
Deuteranopia (green-blind)
#00489D
Tritanopia (blue-blind)
#494B64
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #5b309f;
/* rgb */ color: rgb(91, 48, 159);
/* oklch */ color: oklch(42.8% 0.170 296.2);
Tailwind
colors: {
  custom: {
    50: '#8f6cbc',
    500: '#5b309f',
    950: '#000000',
  },
}
SCSS
$custom: #5b309f;
$custom-light: #8f6cbc;
$custom-dark: #000000;
JSON
{
  "hex": "#5b309f",
  "rgb": {
    "r": 91,
    "g": 48,
    "b": 159
  },
  "hsl": {
    "h": 263.243,
    "s": 53.623,
    "l": 40.588
  },
  "oklch": {
    "l": 0.42822,
    "c": 0.16955,
    "h": 296.2
  },
  "luminance": 0.06841
}

Semantic roles & 50–950 ramp

primary
#5B309F
secondary
#9EBD6E
accent
#DD4BA4
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0712
muted
#7E7A81

Preview Lab

Preview with #5B309F

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

Preview Lab → · Contrast checker → · Palette generator →

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