#5156CD#5156CD

#5156CD is a mid, vivid blue. Relative luminance 0.128; OKLCH L 51.8% C 0.181 H 276.2°. Best body text is #FFFFFF at 5.89:1 contrast (WCAG AA passes).

Color values

HEX#5156CD
RGBrgb(81, 86, 205)
HSLhsl(238, 55%, 56%)
HSVhsv(238, 60%, 80%)
CMYKcmyk(60.5%, 58%, 0%, 19.6%)
CIE-LABlab(42.48, 33.67, -62.49)
CIE-LCHlch(42.48, 70.98, 298.31°)
OKLaboklab(51.76% 0.0197 -0.1796)
OKLCHoklch(51.76% 0.181 276.2)
XYZxyz(17.7370, 12.8113, 59.2839)
Luminance0.1281 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5156CD #CDC851
analogous
#5194CD #5156CD #8A51CD
triadic
#5156CD #CD5156 #56CD51
tetradic
#5156CD #CD5194 #CDC851 #51CD8A
square
#5156CD #CD5194 #CDC851 #51CD8A
split-complementary
#5156CD #CD8A51 #94CD51
monochromatic
#25287F #3237AF #5156CD #8184DB #B0B2E8

Accessibility & contrast

On white

5.89
#5156CD on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.56
#5156CD on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5156CD
5.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5156CD#FFFFFF#000000##FFFFFF
##5156CD1.005.893.565.89
#FFFFFF5.891.0021.001.00
#0000003.5621.001.0021.00
##FFFFFF5.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006AD1
Deuteranopia (green-blind)
#005FCB
Tritanopia (blue-blind)
#007389
Achromatopsia (no color)
#646464

Design tokens & code

CSS
--color: #5156cd;
/* rgb */ color: rgb(81, 86, 205);
/* oklch */ color: oklch(51.8% 0.181 276.2);
Tailwind
colors: {
  custom: {
    50: '#8e85dd',
    500: '#5156cd',
    950: '#000000',
  },
}
SCSS
$custom: #5156cd;
$custom-light: #8e85dd;
$custom-dark: #000000;
JSON
{
  "hex": "#5156cd",
  "rgb": {
    "r": 81,
    "g": 86,
    "b": 205
  },
  "hsl": {
    "h": 237.581,
    "s": 55.357,
    "l": 56.078
  },
  "oklch": {
    "l": 0.51759,
    "c": 0.18064,
    "h": 276.2
  },
  "luminance": 0.12813
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #5156CD

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

Preview Lab → · Contrast checker → · Palette generator →

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