#5157E6#5157E6

#5157E6 is a mid, highly saturated blue. Relative luminance 0.143; OKLCH L 53.9% C 0.212 H 274.9°. Best body text is #FFFFFF at 5.45:1 contrast (WCAG AA passes).

Color values

HEX#5157E6
RGBrgb(81, 87, 230)
HSLhsl(238, 75%, 61%)
HSVhsv(238, 65%, 90%)
CMYKcmyk(64.8%, 62.2%, 0%, 9.8%)
CIE-LABlab(44.63, 41.33, -73.26)
CIE-LCHlch(44.63, 84.12, 299.43°)
OKLaboklab(53.94% 0.018 -0.2112)
OKLCHoklch(53.94% 0.212 274.9)
XYZxyz(21.0798, 14.2771, 76.4924)
Luminance0.1428 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5157E6 #E6E051
analogous
#51A1E6 #5157E6 #9551E6
triadic
#5157E6 #E65157 #57E651
tetradic
#5157E6 #E651A1 #E6E051 #51E695
square
#5157E6 #E651A1 #E6E051 #51E695
split-complementary
#5157E6 #E69551 #A1E651
monochromatic
#181DA5 #1F27DA #5157E6 #878BEE #BCBEF5

Accessibility & contrast

On white

5.45
#5157E6 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.86
#5157E6 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5157E6
5.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5157E6#FFFFFF#000000##FFFFFF
##5157E61.005.453.865.45
#FFFFFF5.451.0021.001.00
#0000003.8621.001.0021.00
##FFFFFF5.451.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5157e6;
/* rgb */ color: rgb(81, 87, 230);
/* oklch */ color: oklch(53.9% 0.212 274.9);
Tailwind
colors: {
  custom: {
    50: '#9286ef',
    500: '#5157e6',
    950: '#000000',
  },
}
SCSS
$custom: #5157e6;
$custom-light: #9286ef;
$custom-dark: #000000;
JSON
{
  "hex": "#5157e6",
  "rgb": {
    "r": 81,
    "g": 87,
    "b": 230
  },
  "hsl": {
    "h": 237.584,
    "s": 74.874,
    "l": 60.98
  },
  "oklch": {
    "l": 0.53943,
    "c": 0.21199,
    "h": 274.9
  },
  "luminance": 0.14279
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #5157E6

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

Preview Lab → · Contrast checker → · Palette generator →

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