#5156CC#5156CC

#5156CC is a mid, vivid blue. Relative luminance 0.128; OKLCH L 51.7% C 0.179 H 276.3°. Best body text is #FFFFFF at 5.91:1 contrast (WCAG AA passes).

Color values

HEX#5156CC
RGBrgb(81, 86, 204)
HSLhsl(238, 55%, 56%)
HSVhsv(238, 60%, 80%)
CMYKcmyk(60.3%, 57.8%, 0%, 20%)
CIE-LABlab(42.40, 33.34, -62.03)
CIE-LCHlch(42.40, 70.42, 298.25°)
OKLaboklab(51.68% 0.0197 -0.1782)
OKLCHoklch(51.68% 0.179 276.3)
XYZxyz(17.6167, 12.7632, 58.6502)
Luminance0.1277 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5156CC #CCC751
analogous
#5193CC #5156CC #8951CC
triadic
#5156CC #CC5156 #56CC51
tetradic
#5156CC #CC5193 #CCC751 #51CC89
square
#5156CC #CC5193 #CCC751 #51CC89
split-complementary
#5156CC #CC8951 #93CC51
monochromatic
#25287E #3338AD #5156CC #8084DA #B0B2E8

Accessibility & contrast

On white

5.91
#5156CC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.55
#5156CC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5156CC
5.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5156CC#FFFFFF#000000##FFFFFF
##5156CC1.005.913.555.91
#FFFFFF5.911.0021.001.00
#0000003.5521.001.0021.00
##FFFFFF5.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0069D0
Deuteranopia (green-blind)
#005FCA
Tritanopia (blue-blind)
#007289
Achromatopsia (no color)
#646464

Design tokens & code

CSS
--color: #5156cc;
/* rgb */ color: rgb(81, 86, 204);
/* oklch */ color: oklch(51.7% 0.179 276.3);
Tailwind
colors: {
  custom: {
    50: '#8e85dc',
    500: '#5156cc',
    950: '#000000',
  },
}
SCSS
$custom: #5156cc;
$custom-light: #8e85dc;
$custom-dark: #000000;
JSON
{
  "hex": "#5156cc",
  "rgb": {
    "r": 81,
    "g": 86,
    "b": 204
  },
  "hsl": {
    "h": 237.561,
    "s": 54.667,
    "l": 55.882
  },
  "oklch": {
    "l": 0.51681,
    "c": 0.17931,
    "h": 276.3
  },
  "luminance": 0.12765
}

Semantic roles & 50–950 ramp

primary
#5156CC
secondary
#D6D4A3
accent
#D84ADE
background
#F9F8FD
surface
#F2EFFB
border
#CCCAD4
text
#0D0B15
muted
#7E7C83

Preview Lab

Preview with #5156CC

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

Preview Lab → · Contrast checker → · Palette generator →

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