#5157E4#5157E4

#5157E4 is a mid, highly saturated blue. Relative luminance 0.142; OKLCH L 53.8% C 0.209 H 275.0°. Best body text is #FFFFFF at 5.48:1 contrast (WCAG AA passes).

Color values

HEX#5157E4
RGBrgb(81, 87, 228)
HSLhsl(238, 73%, 61%)
HSVhsv(238, 64%, 89%)
CMYKcmyk(64.5%, 61.8%, 0%, 10.6%)
CIE-LABlab(44.47, 40.67, -72.39)
CIE-LCHlch(44.47, 83.03, 299.33°)
OKLaboklab(53.78% 0.0181 -0.2086)
OKLCHoklch(53.78% 0.209 275)
XYZxyz(20.8005, 14.1654, 75.0218)
Luminance0.1417 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5157E4 #E4DE51
analogous
#51A0E4 #5157E4 #9451E4
triadic
#5157E4 #E45157 #57E451
tetradic
#5157E4 #E451A0 #E4DE51 #51E494
square
#5157E4 #E451A0 #E4DE51 #51E494
split-complementary
#5157E4 #E49451 #A0E451
monochromatic
#191FA2 #2129D7 #5157E4 #868AEC #BBBDF4

Accessibility & contrast

On white

5.48
#5157E4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.83
#5157E4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5157E4
5.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5157E4#FFFFFF#000000##FFFFFF
##5157E41.005.483.835.48
#FFFFFF5.481.0021.001.00
#0000003.8321.001.0021.00
##FFFFFF5.481.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0070E9
Deuteranopia (green-blind)
#0063E1
Tritanopia (blue-blind)
#007B95
Achromatopsia (no color)
#696969

Design tokens & code

CSS
--color: #5157e4;
/* rgb */ color: rgb(81, 87, 228);
/* oklch */ color: oklch(53.8% 0.209 275.0);
Tailwind
colors: {
  custom: {
    50: '#9286ee',
    500: '#5157e4',
    950: '#000000',
  },
}
SCSS
$custom: #5157e4;
$custom-light: #9286ee;
$custom-dark: #000000;
JSON
{
  "hex": "#5157e4",
  "rgb": {
    "r": 81,
    "g": 87,
    "b": 228
  },
  "hsl": {
    "h": 237.551,
    "s": 73.134,
    "l": 60.588
  },
  "oklch": {
    "l": 0.53777,
    "c": 0.20944,
    "h": 275
  },
  "luminance": 0.14167
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #5157E4

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

Preview Lab → · Contrast checker → · Palette generator →

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