#5158CE#5158CE

#5158CE is a mid, vivid blue. Relative luminance 0.132; OKLCH L 52.2% C 0.179 H 275.7°. Best body text is #FFFFFF at 5.77:1 contrast (WCAG AA passes).

Color values

HEX#5158CE
RGBrgb(81, 88, 206)
HSLhsl(237, 56%, 56%)
HSVhsv(237, 61%, 81%)
CMYKcmyk(60.7%, 57.3%, 0%, 19.2%)
CIE-LABlab(43.04, 32.76, -62.16)
CIE-LCHlch(43.04, 70.26, 297.79°)
OKLaboklab(52.2% 0.0178 -0.1786)
OKLCHoklch(52.2% 0.179 275.7)
XYZxyz(18.0200, 13.1836, 59.9756)
Luminance0.1318 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5158CE #CEC751
analogous
#5197CE #5158CE #8951CE
triadic
#5158CE #CE5158 #58CE51
tetradic
#5158CE #CE5197 #CEC751 #51CE89
square
#5158CE #CE5197 #CEC751 #51CE89
split-complementary
#5158CE #CE8951 #97CE51
monochromatic
#242980 #3239B0 #5158CE #8186DB #B1B4E9

Accessibility & contrast

On white

5.77
#5158CE on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.64
#5158CE on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5158CE
5.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5158CE#FFFFFF#000000##FFFFFF
##5158CE1.005.773.645.77
#FFFFFF5.771.0021.001.00
#0000003.6421.001.0021.00
##FFFFFF5.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006BD2
Deuteranopia (green-blind)
#0060CC
Tritanopia (blue-blind)
#00748A
Achromatopsia (no color)
#666666

Design tokens & code

CSS
--color: #5158ce;
/* rgb */ color: rgb(81, 88, 206);
/* oklch */ color: oklch(52.2% 0.179 275.7);
Tailwind
colors: {
  custom: {
    50: '#8e87de',
    500: '#5158ce',
    950: '#000000',
  },
}
SCSS
$custom: #5158ce;
$custom-light: #8e87de;
$custom-dark: #000000;
JSON
{
  "hex": "#5158ce",
  "rgb": {
    "r": 81,
    "g": 88,
    "b": 206
  },
  "hsl": {
    "h": 236.64,
    "s": 56.054,
    "l": 56.275
  },
  "oklch": {
    "l": 0.52198,
    "c": 0.17945,
    "h": 275.7
  },
  "luminance": 0.13185
}

Semantic roles & 50–950 ramp

primary
#5158CE
secondary
#D7D4A4
accent
#D748DF
background
#F9F8FD
surface
#F2EFFB
border
#CCCAD4
text
#0D0B15
muted
#7E7C83

Preview Lab

Preview with #5158CE

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

Preview Lab → · Contrast checker → · Palette generator →

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