#5156EA#5156EA

#5156EA is a mid, highly saturated blue. Relative luminance 0.143; OKLCH L 54.1% C 0.218 H 274.9°. Best body text is #FFFFFF at 5.43:1 contrast (WCAG AA passes).

Color values

HEX#5156EA
RGBrgb(81, 86, 234)
HSLhsl(238, 78%, 62%)
HSVhsv(238, 65%, 92%)
CMYKcmyk(65.4%, 63.2%, 0%, 8.2%)
CIE-LABlab(44.72, 43.24, -75.37)
CIE-LCHlch(44.72, 86.89, 299.84°)
OKLaboklab(54.11% 0.0185 -0.2174)
OKLCHoklch(54.11% 0.218 274.9)
XYZxyz(21.5675, 14.3435, 79.4579)
Luminance0.1434 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5156EA #EAE551
analogous
#51A3EA #5156EA #9951EA
triadic
#5156EA #EA5156 #56EA51
tetradic
#5156EA #EA51A3 #EAE551 #51EA99
square
#5156EA #EA51A3 #EAE551 #51EA99
split-complementary
#5156EA #EA9951 #A3EA51
monochromatic
#151AAC #1B22E2 #5156EA #888BF1 #BEC0F7

Accessibility & contrast

On white

5.43
#5156EA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.87
#5156EA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5156EA
5.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5156EA#FFFFFF#000000##FFFFFF
##5156EA1.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)
#0071EF
Deuteranopia (green-blind)
#0063E7
Tritanopia (blue-blind)
#007C98
Achromatopsia (no color)
#6A6A6A

Design tokens & code

CSS
--color: #5156ea;
/* rgb */ color: rgb(81, 86, 234);
/* oklch */ color: oklch(54.1% 0.218 274.9);
Tailwind
colors: {
  custom: {
    50: '#9386f2',
    500: '#5156ea',
    950: '#000000',
  },
}
SCSS
$custom: #5156ea;
$custom-light: #9386f2;
$custom-dark: #000000;
JSON
{
  "hex": "#5156ea",
  "rgb": {
    "r": 81,
    "g": 86,
    "b": 234
  },
  "hsl": {
    "h": 238.039,
    "s": 78.462,
    "l": 61.765
  },
  "oklch": {
    "l": 0.54111,
    "c": 0.21819,
    "h": 274.9
  },
  "luminance": 0.14345
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #5156EA

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

Preview Lab → · Contrast checker → · Palette generator →

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