#5157CD#5157CD

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

Color values

HEX#5157CD
RGBrgb(81, 87, 205)
HSLhsl(237, 55%, 56%)
HSVhsv(237, 60%, 80%)
CMYKcmyk(60.5%, 57.6%, 0%, 19.6%)
CIE-LABlab(42.72, 33.05, -62.09)
CIE-LCHlch(42.72, 70.34, 298.02°)
OKLaboklab(51.94% 0.0187 -0.1784)
OKLCHoklch(51.94% 0.179 276)
XYZxyz(17.8174, 12.9721, 59.3107)
Luminance0.1297 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5157CD #CDC751
analogous
#5195CD #5157CD #8951CD
triadic
#5157CD #CD5157 #57CD51
tetradic
#5157CD #CD5195 #CDC751 #51CD89
square
#5157CD #CD5195 #CDC751 #51CD89
split-complementary
#5157CD #CD8951 #95CD51
monochromatic
#25297F #3238AF #5157CD #8185DB #B0B3E8

Accessibility & contrast

On white

5.84
#5157CD on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

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

Best text color

#FFFFFF on #5157CD
5.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5157CD#FFFFFF#000000##FFFFFF
##5157CD1.005.843.595.84
#FFFFFF5.841.0021.001.00
#0000003.5921.001.0021.00
##FFFFFF5.841.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5157cd;
/* rgb */ color: rgb(81, 87, 205);
/* oklch */ color: oklch(51.9% 0.179 276.0);
Tailwind
colors: {
  custom: {
    50: '#8e86dd',
    500: '#5157cd',
    950: '#000000',
  },
}
SCSS
$custom: #5157cd;
$custom-light: #8e86dd;
$custom-dark: #000000;
JSON
{
  "hex": "#5157cd",
  "rgb": {
    "r": 81,
    "g": 87,
    "b": 205
  },
  "hsl": {
    "h": 237.097,
    "s": 55.357,
    "l": 56.078
  },
  "oklch": {
    "l": 0.5194,
    "c": 0.17938,
    "h": 276
  },
  "luminance": 0.12973
}

Semantic roles & 50–950 ramp

primary
#5157CD
secondary
#D7D4A3
accent
#D749DF
background
#F9F8FD
surface
#F2EFFB
border
#CCCAD4
text
#0D0B15
muted
#7E7C83

Preview Lab

Preview with #5157CD

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

Preview Lab → · Contrast checker → · Palette generator →

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