#5158BF#5158BF

#5158BF is a mid, vivid blue. Relative luminance 0.125; OKLCH L 51.1% C 0.159 H 276.3°. Best body text is #FFFFFF at 6.00:1 contrast (WCAG AA passes).

Color values

HEX#5158BF
RGBrgb(81, 88, 191)
HSLhsl(236, 46%, 53%)
HSVhsv(236, 58%, 75%)
CMYKcmyk(57.6%, 53.9%, 0%, 25.1%)
CIE-LABlab(41.98, 27.77, -55.18)
CIE-LCHlch(41.98, 61.78, 296.72°)
OKLaboklab(51.08% 0.0174 -0.158)
OKLCHoklch(51.08% 0.159 276.3)
XYZxyz(16.2840, 12.4892, 50.8327)
Luminance0.1249 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5158BF #BFB851
analogous
#518FBF #5158BF #8151BF
triadic
#5158BF #BF5158 #58BF51
tetradic
#5158BF #BF518F #BFB851 #51BF81
square
#5158BF #BF518F #BFB851 #51BF81
split-complementary
#5158BF #BF8151 #8FBF51
monochromatic
#282D6D #393F9A #5158BF #7E83CF #AAAEE0

Accessibility & contrast

On white

6.00
#5158BF on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.50
#5158BF on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5158BF
6.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5158BF#FFFFFF#000000##FFFFFF
##5158BF1.006.003.506.00
#FFFFFF6.001.0021.001.00
#0000003.5021.001.0021.00
##FFFFFF6.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1768C3
Deuteranopia (green-blind)
#005FBD
Tritanopia (blue-blind)
#097083
Achromatopsia (no color)
#636363

Design tokens & code

CSS
--color: #5158bf;
/* rgb */ color: rgb(81, 88, 191);
/* oklch */ color: oklch(51.1% 0.159 276.3);
Tailwind
colors: {
  custom: {
    50: '#8b87d3',
    500: '#5158bf',
    950: '#000000',
  },
}
SCSS
$custom: #5158bf;
$custom-light: #8b87d3;
$custom-dark: #000000;
JSON
{
  "hex": "#5158bf",
  "rgb": {
    "r": 81,
    "g": 88,
    "b": 191
  },
  "hsl": {
    "h": 236.182,
    "s": 46.218,
    "l": 53.333
  },
  "oklch": {
    "l": 0.51077,
    "c": 0.159,
    "h": 276.3
  },
  "luminance": 0.1249
}

Semantic roles & 50–950 ramp

primary
#5158BF
secondary
#CECB9E
accent
#CD52D6
background
#F9F8FD
surface
#F1EFFA
border
#CBCAD3
text
#0D0B14
muted
#7E7C83

Preview Lab

Preview with #5158BF

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

Preview Lab → · Contrast checker → · Palette generator →

#5158BF Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva