#5158E4#5158E4

#5158E4 is a mid, highly saturated blue. Relative luminance 0.143; OKLCH L 53.9% C 0.208 H 274.8°. Best body text is #FFFFFF at 5.43:1 contrast (WCAG AA passes).

Color values

HEX#5158E4
RGBrgb(81, 88, 228)
HSLhsl(237, 73%, 61%)
HSVhsv(237, 64%, 89%)
CMYKcmyk(64.5%, 61.4%, 0%, 10.6%)
CIE-LABlab(44.70, 40.07, -72.01)
CIE-LCHlch(44.70, 82.41, 299.09°)
OKLaboklab(53.95% 0.0173 -0.2075)
OKLCHoklch(53.95% 0.208 274.8)
XYZxyz(20.8820, 14.3284, 75.0490)
Luminance0.1433 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5158E4 #E4DD51
analogous
#51A1E4 #5158E4 #9351E4
triadic
#5158E4 #E45158 #58E451
tetradic
#5158E4 #E451A1 #E4DD51 #51E493
square
#5158E4 #E451A1 #E4DD51 #51E493
split-complementary
#5158E4 #E49351 #A1E451
monochromatic
#1920A2 #212AD7 #5158E4 #868BEC #BBBEF4

Accessibility & contrast

On white

5.43
#5158E4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.87
#5158E4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5158E4
5.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5158E4#FFFFFF#000000##FFFFFF
##5158E41.005.433.875.43
#FFFFFF5.431.0021.001.00
#0000003.8721.001.0021.00
##FFFFFF5.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0070E9
Deuteranopia (green-blind)
#0063E1
Tritanopia (blue-blind)
#007B96
Achromatopsia (no color)
#6A6A6A

Design tokens & code

CSS
--color: #5158e4;
/* rgb */ color: rgb(81, 88, 228);
/* oklch */ color: oklch(53.9% 0.208 274.8);
Tailwind
colors: {
  custom: {
    50: '#9287ee',
    500: '#5158e4',
    950: '#000000',
  },
}
SCSS
$custom: #5158e4;
$custom-light: #9287ee;
$custom-dark: #000000;
JSON
{
  "hex": "#5158e4",
  "rgb": {
    "r": 81,
    "g": 88,
    "b": 228
  },
  "hsl": {
    "h": 237.143,
    "s": 73.134,
    "l": 60.588
  },
  "oklch": {
    "l": 0.53947,
    "c": 0.20826,
    "h": 274.8
  },
  "luminance": 0.1433
}

Semantic roles & 50–950 ramp

primary
#5158E4
secondary
#E4E2AC
accent
#CC10D5
background
#F9F8FE
surface
#F2EFFD
border
#CCCAD5
text
#0E0B16
muted
#7E7C84

Preview Lab

Preview with #5158E4

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

Preview Lab → · Contrast checker → · Palette generator →

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