#5158EA#5158EA

#5158EA is a mid, highly saturated blue. Relative luminance 0.147; OKLCH L 54.4% C 0.216 H 274.5°. Best body text is #FFFFFF at 5.34:1 contrast (WCAG AA passes).

Color values

HEX#5158EA
RGBrgb(81, 88, 234)
HSLhsl(237, 78%, 62%)
HSVhsv(237, 65%, 92%)
CMYKcmyk(65.4%, 62.4%, 0%, 8.2%)
CIE-LABlab(45.18, 42.04, -74.63)
CIE-LCHlch(45.18, 85.66, 299.40°)
OKLaboklab(54.44% 0.017 -0.2152)
OKLCHoklch(54.44% 0.216 274.5)
XYZxyz(21.7294, 14.6674, 79.5119)
Luminance0.1467 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5158EA #EAE351
analogous
#51A5EA #5158EA #9751EA
triadic
#5158EA #EA5158 #58EA51
tetradic
#5158EA #EA51A5 #EAE351 #51EA97
square
#5158EA #EA51A5 #EAE351 #51EA97
split-complementary
#5158EA #EA9751 #A5EA51
monochromatic
#151CAC #1B24E2 #5158EA #888CF1 #BEC1F7

Accessibility & contrast

On white

5.34
#5158EA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.93
#5158EA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5158EA
5.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5158EA#FFFFFF#000000##FFFFFF
##5158EA1.005.343.935.34
#FFFFFF5.341.0021.001.00
#0000003.9321.001.0021.00
##FFFFFF5.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0072EF
Deuteranopia (green-blind)
#0064E7
Tritanopia (blue-blind)
#007D99
Achromatopsia (no color)
#6B6B6B

Design tokens & code

CSS
--color: #5158ea;
/* rgb */ color: rgb(81, 88, 234);
/* oklch */ color: oklch(54.4% 0.216 274.5);
Tailwind
colors: {
  custom: {
    50: '#9387f2',
    500: '#5158ea',
    950: '#000000',
  },
}
SCSS
$custom: #5158ea;
$custom-light: #9387f2;
$custom-dark: #000000;
JSON
{
  "hex": "#5158ea",
  "rgb": {
    "r": 81,
    "g": 88,
    "b": 234
  },
  "hsl": {
    "h": 237.255,
    "s": 78.462,
    "l": 61.765
  },
  "oklch": {
    "l": 0.54443,
    "c": 0.21589,
    "h": 274.5
  },
  "luminance": 0.14669
}

Semantic roles & 50–950 ramp

primary
#5158EA
secondary
#E8E5AF
accent
#D10BDB
background
#F9F8FE
surface
#F2EFFD
border
#CCCAD5
text
#0E0B17
muted
#7E7C85

Preview Lab

Preview with #5158EA

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

Preview Lab → · Contrast checker → · Palette generator →

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