#5156CB#5156CB

#5156CB is a mid, vivid blue. Relative luminance 0.127; OKLCH L 51.6% C 0.178 H 276.3°. Best body text is #FFFFFF at 5.93:1 contrast (WCAG AA passes).

Color values

HEX#5156CB
RGBrgb(81, 86, 203)
HSLhsl(238, 54%, 56%)
HSVhsv(238, 60%, 80%)
CMYKcmyk(60.1%, 57.6%, 0%, 20.4%)
CIE-LABlab(42.33, 33.00, -61.57)
CIE-LCHlch(42.33, 69.86, 298.19°)
OKLaboklab(51.6% 0.0197 -0.1769)
OKLCHoklch(51.6% 0.178 276.3)
XYZxyz(17.4971, 12.7154, 58.0206)
Luminance0.1272 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5156CB #CBC651
analogous
#5193CB #5156CB #8951CB
triadic
#5156CB #CB5156 #56CB51
tetradic
#5156CB #CB5193 #CBC651 #51CB89
square
#5156CB #CB5193 #CBC651 #51CB89
split-complementary
#5156CB #CB8951 #93CB51
monochromatic
#25297C #3338AC #5156CB #8084D9 #AFB2E7

Accessibility & contrast

On white

5.93
#5156CB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.54
#5156CB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5156CB
5.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5156CB#FFFFFF#000000##FFFFFF
##5156CB1.005.933.545.93
#FFFFFF5.931.0021.001.00
#0000003.5421.001.0021.00
##FFFFFF5.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0069CF
Deuteranopia (green-blind)
#005FC9
Tritanopia (blue-blind)
#007288
Achromatopsia (no color)
#646464

Design tokens & code

CSS
--color: #5156cb;
/* rgb */ color: rgb(81, 86, 203);
/* oklch */ color: oklch(51.6% 0.178 276.3);
Tailwind
colors: {
  custom: {
    50: '#8d85dc',
    500: '#5156cb',
    950: '#000000',
  },
}
SCSS
$custom: #5156cb;
$custom-light: #8d85dc;
$custom-dark: #000000;
JSON
{
  "hex": "#5156cb",
  "rgb": {
    "r": 81,
    "g": 86,
    "b": 203
  },
  "hsl": {
    "h": 237.541,
    "s": 53.982,
    "l": 55.686
  },
  "oklch": {
    "l": 0.51604,
    "c": 0.17797,
    "h": 276.3
  },
  "luminance": 0.12717
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #5156CB

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

Preview Lab → · Contrast checker → · Palette generator →

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