#5157CC#5157CC

#5157CC is a mid, vivid blue. Relative luminance 0.129; OKLCH L 51.9% C 0.178 H 276.0°. Best body text is #FFFFFF at 5.86:1 contrast (WCAG AA passes).

Color values

HEX#5157CC
RGBrgb(81, 87, 204)
HSLhsl(237, 55%, 56%)
HSVhsv(237, 60%, 80%)
CMYKcmyk(60.3%, 57.4%, 0%, 20%)
CIE-LABlab(42.65, 32.72, -61.64)
CIE-LCHlch(42.65, 69.78, 297.96°)
OKLaboklab(51.86% 0.0187 -0.1771)
OKLCHoklch(51.86% 0.178 276)
XYZxyz(17.6971, 12.9240, 58.6770)
Luminance0.1293 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5157CC #CCC651
analogous
#5194CC #5157CC #8851CC
triadic
#5157CC #CC5157 #57CC51
tetradic
#5157CC #CC5194 #CCC651 #51CC88
square
#5157CC #CC5194 #CCC651 #51CC88
split-complementary
#5157CC #CC8851 #94CC51
monochromatic
#25297E #3339AD #5157CC #8085DA #B0B2E8

Accessibility & contrast

On white

5.86
#5157CC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.59
#5157CC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5157CC
5.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5157CC#FFFFFF#000000##FFFFFF
##5157CC1.005.863.595.86
#FFFFFF5.861.0021.001.00
#0000003.5921.001.0021.00
##FFFFFF5.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006AD0
Deuteranopia (green-blind)
#0060CA
Tritanopia (blue-blind)
#007389
Achromatopsia (no color)
#656565

Design tokens & code

CSS
--color: #5157cc;
/* rgb */ color: rgb(81, 87, 204);
/* oklch */ color: oklch(51.9% 0.178 276.0);
Tailwind
colors: {
  custom: {
    50: '#8d86dc',
    500: '#5157cc',
    950: '#000000',
  },
}
SCSS
$custom: #5157cc;
$custom-light: #8d86dc;
$custom-dark: #000000;
JSON
{
  "hex": "#5157cc",
  "rgb": {
    "r": 81,
    "g": 87,
    "b": 204
  },
  "hsl": {
    "h": 237.073,
    "s": 54.667,
    "l": 55.882
  },
  "oklch": {
    "l": 0.51863,
    "c": 0.17804,
    "h": 276
  },
  "luminance": 0.12925
}

Semantic roles & 50–950 ramp

primary
#5157CC
secondary
#D6D3A3
accent
#D74ADE
background
#F9F8FD
surface
#F2EFFB
border
#CCCAD4
text
#0D0B15
muted
#7E7C83

Preview Lab

Preview with #5157CC

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

Preview Lab → · Contrast checker → · Palette generator →

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