#5B40E8#5B40E8

#5B40E8 is a mid, highly saturated blue. Relative luminance 0.117; OKLCH L 51.4% C 0.237 H 281.4°. Best body text is #FFFFFF at 6.28:1 contrast (WCAG AA passes).

Color values

HEX#5B40E8
RGBrgb(91, 64, 232)
HSLhsl(250, 79%, 58%)
HSVhsv(250, 72%, 91%)
CMYKcmyk(60.8%, 72.4%, 0%, 9%)
CIE-LABlab(40.76, 56.21, -80.71)
CIE-LCHlch(40.76, 98.35, 304.86°)
OKLaboklab(51.39% 0.0468 -0.2327)
OKLCHoklch(51.39% 0.237 281.4)
XYZxyz(20.7087, 11.7156, 77.4984)
Luminance0.1172 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B40E8 #CDE840
analogous
#4079E8 #5B40E8 #AF40E8
triadic
#5B40E8 #E85B40 #40E85B
tetradic
#5B40E8 #E84079 #CDE840 #40E8AF
square
#5B40E8 #E84079 #CDE840 #40E8AF
split-complementary
#5B40E8 #E8AF40 #79E840
monochromatic
#29139B #3719D2 #5B40E8 #8A77EF #B9ADF5

Accessibility & contrast

On white

6.28
#5B40E8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.34
#5B40E8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5B40E8
6.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B40E8#FFFFFF#000000##FFFFFF
##5B40E81.006.283.346.28
#FFFFFF6.281.0021.001.00
#0000003.3421.001.0021.00
##FFFFFF6.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0066ED
Deuteranopia (green-blind)
#005AE5
Tritanopia (blue-blind)
#006F91
Achromatopsia (no color)
#606060

Design tokens & code

CSS
--color: #5b40e8;
/* rgb */ color: rgb(91, 64, 232);
/* oklch */ color: oklch(51.4% 0.237 281.4);
Tailwind
colors: {
  custom: {
    50: '#9978f1',
    500: '#5b40e8',
    950: '#000000',
  },
}
SCSS
$custom: #5b40e8;
$custom-light: #9978f1;
$custom-dark: #000000;
JSON
{
  "hex": "#5b40e8",
  "rgb": {
    "r": 91,
    "g": 64,
    "b": 232
  },
  "hsl": {
    "h": 249.643,
    "s": 78.505,
    "l": 58.039
  },
  "oklch": {
    "l": 0.5139,
    "c": 0.23741,
    "h": 281.4
  },
  "luminance": 0.11717
}

Semantic roles & 50–950 ramp

primary
#5B40E8
secondary
#D9E3A0
accent
#F533D6
background
#FAF7FE
surface
#F4EDFD
border
#CEC8D5
text
#0F0917
muted
#7F7B85

Preview Lab

Preview with #5B40E8

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

Preview Lab → · Contrast checker → · Palette generator →

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