#5156D7#5156D7

#5156D7 is a mid, vivid blue. Relative luminance 0.133; OKLCH L 52.5% C 0.194 H 275.8°. Best body text is #FFFFFF at 5.73:1 contrast (WCAG AA passes).

Color values

HEX#5156D7
RGBrgb(81, 86, 215)
HSLhsl(238, 63%, 58%)
HSVhsv(238, 62%, 84%)
CMYKcmyk(62.3%, 60%, 0%, 15.7%)
CIE-LABlab(43.23, 36.98, -67.02)
CIE-LCHlch(43.23, 76.54, 298.89°)
OKLaboklab(52.55% 0.0195 -0.1929)
OKLCHoklch(52.55% 0.194 275.8)
XYZxyz(18.9829, 13.3097, 65.8455)
Luminance0.1331 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5156D7 #D7D251
analogous
#5199D7 #5156D7 #8F51D7
triadic
#5156D7 #D75156 #56D751
tetradic
#5156D7 #D75199 #D7D251 #51D78F
square
#5156D7 #D75199 #D7D251 #51D78F
split-complementary
#5156D7 #D78F51 #99D751
monochromatic
#20258D #2C31BF #5156D7 #8386E2 #B5B7EE

Accessibility & contrast

On white

5.73
#5156D7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.66
#5156D7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5156D7
5.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5156D7#FFFFFF#000000##FFFFFF
##5156D71.005.733.665.73
#FFFFFF5.731.0021.001.00
#0000003.6621.001.0021.00
##FFFFFF5.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006CDB
Deuteranopia (green-blind)
#0060D4
Tritanopia (blue-blind)
#00768E
Achromatopsia (no color)
#666666

Design tokens & code

CSS
--color: #5156d7;
/* rgb */ color: rgb(81, 86, 215);
/* oklch */ color: oklch(52.5% 0.194 275.8);
Tailwind
colors: {
  custom: {
    50: '#8f86e4',
    500: '#5156d7',
    950: '#000000',
  },
}
SCSS
$custom: #5156d7;
$custom-light: #8f86e4;
$custom-dark: #000000;
JSON
{
  "hex": "#5156d7",
  "rgb": {
    "r": 81,
    "g": 86,
    "b": 215
  },
  "hsl": {
    "h": 237.761,
    "s": 62.617,
    "l": 58.039
  },
  "oklch": {
    "l": 0.52548,
    "c": 0.19385,
    "h": 275.8
  },
  "luminance": 0.13311
}

Semantic roles & 50–950 ramp

primary
#5156D7
secondary
#DDDBA7
accent
#E042E6
background
#F9F8FE
surface
#F2EFFC
border
#CCCAD5
text
#0E0B16
muted
#7E7C84

Preview Lab

Preview with #5156D7

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

Preview Lab → · Contrast checker → · Palette generator →

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