#5158E6#5158E6

#5158E6 is a mid, highly saturated blue. Relative luminance 0.144; OKLCH L 54.1% C 0.211 H 274.7°. Best body text is #FFFFFF at 5.40:1 contrast (WCAG AA passes).

Color values

HEX#5158E6
RGBrgb(81, 88, 230)
HSLhsl(237, 75%, 61%)
HSVhsv(237, 65%, 90%)
CMYKcmyk(64.8%, 61.7%, 0%, 9.8%)
CIE-LABlab(44.86, 40.73, -72.89)
CIE-LCHlch(44.86, 83.49, 299.19°)
OKLaboklab(54.11% 0.0173 -0.2101)
OKLCHoklch(54.11% 0.211 274.7)
XYZxyz(21.1613, 14.4401, 76.5196)
Luminance0.1444 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5158E6 #E6DF51
analogous
#51A2E6 #5158E6 #9451E6
triadic
#5158E6 #E65158 #58E651
tetradic
#5158E6 #E651A2 #E6DF51 #51E694
square
#5158E6 #E651A2 #E6DF51 #51E694
split-complementary
#5158E6 #E69451 #A2E651
monochromatic
#181EA5 #1F28DA #5158E6 #878BEE #BCBFF5

Accessibility & contrast

On white

5.40
#5158E6 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.89
#5158E6 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5158E6
5.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5158E6#FFFFFF#000000##FFFFFF
##5158E61.005.403.895.40
#FFFFFF5.401.0021.001.00
#0000003.8921.001.0021.00
##FFFFFF5.401.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0071EB
Deuteranopia (green-blind)
#0064E3
Tritanopia (blue-blind)
#007C97
Achromatopsia (no color)
#6A6A6A

Design tokens & code

CSS
--color: #5158e6;
/* rgb */ color: rgb(81, 88, 230);
/* oklch */ color: oklch(54.1% 0.211 274.7);
Tailwind
colors: {
  custom: {
    50: '#9287ef',
    500: '#5158e6',
    950: '#000000',
  },
}
SCSS
$custom: #5158e6;
$custom-light: #9287ef;
$custom-dark: #000000;
JSON
{
  "hex": "#5158e6",
  "rgb": {
    "r": 81,
    "g": 88,
    "b": 230
  },
  "hsl": {
    "h": 237.181,
    "s": 74.874,
    "l": 60.98
  },
  "oklch": {
    "l": 0.54111,
    "c": 0.21082,
    "h": 274.7
  },
  "luminance": 0.14442
}

Semantic roles & 50–950 ramp

primary
#5158E6
secondary
#E5E3AD
accent
#CE0ED7
background
#F9F8FE
surface
#F2EFFD
border
#CCCAD5
text
#0E0B17
muted
#7E7C85

Preview Lab

Preview with #5158E6

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

Preview Lab → · Contrast checker → · Palette generator →

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