#5158E8#5158E8

#5158E8 is a mid, highly saturated blue. Relative luminance 0.146; OKLCH L 54.3% C 0.213 H 274.6°. Best body text is #FFFFFF at 5.37:1 contrast (WCAG AA passes).

Color values

HEX#5158E8
RGBrgb(81, 88, 232)
HSLhsl(237, 77%, 61%)
HSVhsv(237, 65%, 91%)
CMYKcmyk(65.1%, 62.1%, 0%, 9%)
CIE-LABlab(45.02, 41.39, -73.76)
CIE-LCHlch(45.02, 84.58, 299.30°)
OKLaboklab(54.28% 0.0171 -0.2127)
OKLCHoklch(54.28% 0.213 274.6)
XYZxyz(21.4437, 14.5531, 78.0073)
Luminance0.1456 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5158E8 #E8E151
analogous
#51A3E8 #5158E8 #9651E8
triadic
#5158E8 #E85158 #58E851
tetradic
#5158E8 #E851A3 #E8E151 #51E896
square
#5158E8 #E851A3 #E8E151 #51E896
split-complementary
#5158E8 #E89651 #A3E851
monochromatic
#161DA8 #1D26DE #5158E8 #878CEF #BDC0F6

Accessibility & contrast

On white

5.37
#5158E8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.91
#5158E8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5158E8
5.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5158E8#FFFFFF#000000##FFFFFF
##5158E81.005.373.915.37
#FFFFFF5.371.0021.001.00
#0000003.9121.001.0021.00
##FFFFFF5.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0071ED
Deuteranopia (green-blind)
#0064E5
Tritanopia (blue-blind)
#007D98
Achromatopsia (no color)
#6A6A6A

Design tokens & code

CSS
--color: #5158e8;
/* rgb */ color: rgb(81, 88, 232);
/* oklch */ color: oklch(54.3% 0.213 274.6);
Tailwind
colors: {
  custom: {
    50: '#9287f0',
    500: '#5158e8',
    950: '#000000',
  },
}
SCSS
$custom: #5158e8;
$custom-light: #9287f0;
$custom-dark: #000000;
JSON
{
  "hex": "#5158e8",
  "rgb": {
    "r": 81,
    "g": 88,
    "b": 232
  },
  "hsl": {
    "h": 237.219,
    "s": 76.65,
    "l": 61.373
  },
  "oklch": {
    "l": 0.54277,
    "c": 0.21336,
    "h": 274.6
  },
  "luminance": 0.14555
}

Semantic roles & 50–950 ramp

primary
#5158E8
secondary
#E7E4AE
accent
#CF0DD9
background
#F9F8FE
surface
#F2EFFD
border
#CCCAD5
text
#0E0B17
muted
#7E7C85

Preview Lab

Preview with #5158E8

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

Preview Lab → · Contrast checker → · Palette generator →

#5158E8 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva