#5157C8#5157C8

#5157C8 is a mid, vivid blue. Relative luminance 0.127; OKLCH L 51.6% C 0.173 H 276.2°. Best body text is #FFFFFF at 5.92:1 contrast (WCAG AA passes).

Color values

HEX#5157C8
RGBrgb(81, 87, 200)
HSLhsl(237, 52%, 55%)
HSVhsv(237, 60%, 78%)
CMYKcmyk(59.5%, 56.5%, 0%, 21.6%)
CIE-LABlab(42.36, 31.39, -59.79)
CIE-LCHlch(42.36, 67.53, 297.70°)
OKLaboklab(51.56% 0.0187 -0.1716)
OKLCHoklch(51.56% 0.173 276.2)
XYZxyz(17.2235, 12.7346, 56.1828)
Luminance0.1274 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5157C8 #C8C251
analogous
#5192C8 #5157C8 #8751C8
triadic
#5157C8 #C85157 #57C851
tetradic
#5157C8 #C85192 #C8C251 #51C887
square
#5157C8 #C85192 #C8C251 #51C887
split-complementary
#5157C8 #C88751 #92C851
monochromatic
#262A79 #353BA7 #5157C8 #8084D7 #AEB1E5

Accessibility & contrast

On white

5.92
#5157C8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.55
#5157C8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5157C8
5.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5157C8#FFFFFF#000000##FFFFFF
##5157C81.005.923.555.92
#FFFFFF5.921.0021.001.00
#0000003.5521.001.0021.00
##FFFFFF5.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0069CC
Deuteranopia (green-blind)
#005FC6
Tritanopia (blue-blind)
#007287
Achromatopsia (no color)
#646464

Design tokens & code

CSS
--color: #5157c8;
/* rgb */ color: rgb(81, 87, 200);
/* oklch */ color: oklch(51.6% 0.173 276.2);
Tailwind
colors: {
  custom: {
    50: '#8d86d9',
    500: '#5157c8',
    950: '#000000',
  },
}
SCSS
$custom: #5157c8;
$custom-light: #8d86d9;
$custom-dark: #000000;
JSON
{
  "hex": "#5157c8",
  "rgb": {
    "r": 81,
    "g": 87,
    "b": 200
  },
  "hsl": {
    "h": 236.975,
    "s": 51.965,
    "l": 55.098
  },
  "oklch": {
    "l": 0.51558,
    "c": 0.17264,
    "h": 276.2
  },
  "luminance": 0.12736
}

Semantic roles & 50–950 ramp

primary
#5157C8
secondary
#D3D1A1
accent
#D44CDB
background
#F9F8FD
surface
#F1EFFB
border
#CBCAD4
text
#0D0B15
muted
#7E7C83

Preview Lab

Preview with #5157C8

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

Preview Lab → · Contrast checker → · Palette generator →

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