#5157CE#5157CE

#5157CE is a mid, vivid blue. Relative luminance 0.130; OKLCH L 52.0% C 0.181 H 275.9°. Best body text is #FFFFFF at 5.83:1 contrast (WCAG AA passes).

Color values

HEX#5157CE
RGBrgb(81, 87, 206)
HSLhsl(237, 56%, 56%)
HSVhsv(237, 61%, 81%)
CMYKcmyk(60.7%, 57.8%, 0%, 19.2%)
CIE-LABlab(42.79, 33.38, -62.55)
CIE-LCHlch(42.79, 70.90, 298.09°)
OKLaboklab(52.02% 0.0187 -0.1797)
OKLCHoklch(52.02% 0.181 275.9)
XYZxyz(17.9385, 13.0206, 59.9485)
Luminance0.1302 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5157CE #CEC851
analogous
#5196CE #5157CE #8A51CE
triadic
#5157CE #CE5157 #57CE51
tetradic
#5157CE #CE5196 #CEC851 #51CE8A
square
#5157CE #CE5196 #CEC851 #51CE8A
split-complementary
#5157CE #CE8A51 #96CE51
monochromatic
#242980 #3238B0 #5157CE #8185DB #B1B3E9

Accessibility & contrast

On white

5.83
#5157CE on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.60
#5157CE on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5157CE
5.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5157CE#FFFFFF#000000##FFFFFF
##5157CE1.005.833.605.83
#FFFFFF5.831.0021.001.00
#0000003.6021.001.0021.00
##FFFFFF5.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006BD2
Deuteranopia (green-blind)
#0060CC
Tritanopia (blue-blind)
#00748A
Achromatopsia (no color)
#656565

Design tokens & code

CSS
--color: #5157ce;
/* rgb */ color: rgb(81, 87, 206);
/* oklch */ color: oklch(52.0% 0.181 275.9);
Tailwind
colors: {
  custom: {
    50: '#8e86de',
    500: '#5157ce',
    950: '#000000',
  },
}
SCSS
$custom: #5157ce;
$custom-light: #8e86de;
$custom-dark: #000000;
JSON
{
  "hex": "#5157ce",
  "rgb": {
    "r": 81,
    "g": 87,
    "b": 206
  },
  "hsl": {
    "h": 237.12,
    "s": 56.054,
    "l": 56.275
  },
  "oklch": {
    "l": 0.52017,
    "c": 0.18072,
    "h": 275.9
  },
  "luminance": 0.13022
}

Semantic roles & 50–950 ramp

primary
#5157CE
secondary
#D7D5A4
accent
#D848DF
background
#F9F8FD
surface
#F2EFFB
border
#CCCAD4
text
#0D0B15
muted
#7E7C83

Preview Lab

Preview with #5157CE

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

Preview Lab → · Contrast checker → · Palette generator →

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