#5157CB#5157CB

#5157CB is a mid, vivid blue. Relative luminance 0.129; OKLCH L 51.8% C 0.177 H 276.1°. Best body text is #FFFFFF at 5.87:1 contrast (WCAG AA passes).

Color values

HEX#5157CB
RGBrgb(81, 87, 203)
HSLhsl(237, 54%, 56%)
HSVhsv(237, 60%, 80%)
CMYKcmyk(60.1%, 57.1%, 0%, 20.4%)
CIE-LABlab(42.58, 32.38, -61.18)
CIE-LCHlch(42.58, 69.22, 297.89°)
OKLaboklab(51.79% 0.0187 -0.1757)
OKLCHoklch(51.79% 0.177 276.1)
XYZxyz(17.5775, 12.8762, 58.0474)
Luminance0.1288 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5157CB #CBC551
analogous
#5194CB #5157CB #8851CB
triadic
#5157CB #CB5157 #57CB51
tetradic
#5157CB #CB5194 #CBC551 #51CB88
square
#5157CB #CB5194 #CBC551 #51CB88
split-complementary
#5157CB #CB8851 #94CB51
monochromatic
#25297C #3339AC #5157CB #8084D9 #AFB2E7

Accessibility & contrast

On white

5.87
#5157CB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.58
#5157CB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5157CB
5.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5157CB#FFFFFF#000000##FFFFFF
##5157CB1.005.873.585.87
#FFFFFF5.871.0021.001.00
#0000003.5821.001.0021.00
##FFFFFF5.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006ACF
Deuteranopia (green-blind)
#005FC9
Tritanopia (blue-blind)
#007388
Achromatopsia (no color)
#646464

Design tokens & code

CSS
--color: #5157cb;
/* rgb */ color: rgb(81, 87, 203);
/* oklch */ color: oklch(51.8% 0.177 276.1);
Tailwind
colors: {
  custom: {
    50: '#8d86dc',
    500: '#5157cb',
    950: '#000000',
  },
}
SCSS
$custom: #5157cb;
$custom-light: #8d86dc;
$custom-dark: #000000;
JSON
{
  "hex": "#5157cb",
  "rgb": {
    "r": 81,
    "g": 87,
    "b": 203
  },
  "hsl": {
    "h": 237.049,
    "s": 53.982,
    "l": 55.686
  },
  "oklch": {
    "l": 0.51786,
    "c": 0.17669,
    "h": 276.1
  },
  "luminance": 0.12878
}

Semantic roles & 50–950 ramp

primary
#5157CB
secondary
#D5D3A3
accent
#D64ADD
background
#F9F8FD
surface
#F2EFFB
border
#CCCAD4
text
#0D0B15
muted
#7E7C83

Preview Lab

Preview with #5157CB

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

Preview Lab → · Contrast checker → · Palette generator →

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