#5157BF#5157BF

#5157BF is a mid, vivid blue. Relative luminance 0.123; OKLCH L 50.9% C 0.160 H 276.6°. Best body text is #FFFFFF at 6.06:1 contrast (WCAG AA passes).

Color values

HEX#5157BF
RGBrgb(81, 87, 191)
HSLhsl(237, 46%, 53%)
HSVhsv(237, 58%, 75%)
CMYKcmyk(57.6%, 54.5%, 0%, 25.1%)
CIE-LABlab(41.73, 28.40, -55.59)
CIE-LCHlch(41.73, 62.42, 297.06°)
OKLaboklab(50.89% 0.0184 -0.1593)
OKLCHoklch(50.89% 0.16 276.6)
XYZxyz(16.2025, 12.3262, 50.8055)
Luminance0.1233 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5157BF #BFB951
analogous
#518EBF #5157BF #8251BF
triadic
#5157BF #BF5157 #57BF51
tetradic
#5157BF #BF518E #BFB951 #51BF82
square
#5157BF #BF518E #BFB951 #51BF82
split-complementary
#5157BF #BF8251 #8EBF51
monochromatic
#282C6D #393E9A #5157BF #7E82CF #AAADE0

Accessibility & contrast

On white

6.06
#5157BF on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.47
#5157BF on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5157BF
6.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5157BF#FFFFFF#000000##FFFFFF
##5157BF1.006.063.476.06
#FFFFFF6.061.0021.001.00
#0000003.4721.001.0021.00
##FFFFFF6.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1267C3
Deuteranopia (green-blind)
#005EBD
Tritanopia (blue-blind)
#096F82
Achromatopsia (no color)
#626262

Design tokens & code

CSS
--color: #5157bf;
/* rgb */ color: rgb(81, 87, 191);
/* oklch */ color: oklch(50.9% 0.160 276.6);
Tailwind
colors: {
  custom: {
    50: '#8b86d3',
    500: '#5157bf',
    950: '#000000',
  },
}
SCSS
$custom: #5157bf;
$custom-light: #8b86d3;
$custom-dark: #000000;
JSON
{
  "hex": "#5157bf",
  "rgb": {
    "r": 81,
    "g": 87,
    "b": 191
  },
  "hsl": {
    "h": 236.727,
    "s": 46.218,
    "l": 53.333
  },
  "oklch": {
    "l": 0.50887,
    "c": 0.16033,
    "h": 276.6
  },
  "luminance": 0.12327
}

Semantic roles & 50–950 ramp

primary
#5157BF
secondary
#CECB9E
accent
#CF52D6
background
#F9F8FD
surface
#F1EFFA
border
#CBCAD3
text
#0D0B14
muted
#7E7C83

Preview Lab

Preview with #5157BF

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

Preview Lab → · Contrast checker → · Palette generator →

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