#5157EA#5157EA

#5157EA is a mid, highly saturated blue. Relative luminance 0.145; OKLCH L 54.3% C 0.217 H 274.7°. Best body text is #FFFFFF at 5.38:1 contrast (WCAG AA passes).

Color values

HEX#5157EA
RGBrgb(81, 87, 234)
HSLhsl(238, 78%, 62%)
HSVhsv(238, 65%, 92%)
CMYKcmyk(65.4%, 62.8%, 0%, 8.2%)
CIE-LABlab(44.95, 42.64, -75.00)
CIE-LCHlch(44.95, 86.28, 299.62°)
OKLaboklab(54.28% 0.0178 -0.2163)
OKLCHoklch(54.28% 0.217 274.7)
XYZxyz(21.6479, 14.5043, 79.4847)
Luminance0.1451 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5157EA #EAE451
analogous
#51A4EA #5157EA #9851EA
triadic
#5157EA #EA5157 #57EA51
tetradic
#5157EA #EA51A4 #EAE451 #51EA98
square
#5157EA #EA51A4 #EAE451 #51EA98
split-complementary
#5157EA #EA9851 #A4EA51
monochromatic
#151BAC #1B23E2 #5157EA #888CF1 #BEC0F7

Accessibility & contrast

On white

5.38
#5157EA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.90
#5157EA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5157EA
5.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5157EA#FFFFFF#000000##FFFFFF
##5157EA1.005.383.905.38
#FFFFFF5.381.0021.001.00
#0000003.9021.001.0021.00
##FFFFFF5.381.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5157ea;
/* rgb */ color: rgb(81, 87, 234);
/* oklch */ color: oklch(54.3% 0.217 274.7);
Tailwind
colors: {
  custom: {
    50: '#9387f2',
    500: '#5157ea',
    950: '#000000',
  },
}
SCSS
$custom: #5157ea;
$custom-light: #9387f2;
$custom-dark: #000000;
JSON
{
  "hex": "#5157ea",
  "rgb": {
    "r": 81,
    "g": 87,
    "b": 234
  },
  "hsl": {
    "h": 237.647,
    "s": 78.462,
    "l": 61.765
  },
  "oklch": {
    "l": 0.54276,
    "c": 0.21704,
    "h": 274.7
  },
  "luminance": 0.14506
}

Semantic roles & 50–950 ramp

primary
#5157EA
secondary
#E8E6AF
accent
#D30BDB
background
#F9F8FE
surface
#F2EFFD
border
#CCCAD5
text
#0F0B17
muted
#7E7C85

Preview Lab

Preview with #5157EA

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

Preview Lab → · Contrast checker → · Palette generator →

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