#5158CB#5158CB

#5158CB is a mid, vivid blue. Relative luminance 0.130; OKLCH L 52.0% C 0.175 H 275.8°. Best body text is #FFFFFF at 5.82:1 contrast (WCAG AA passes).

Color values

HEX#5158CB
RGBrgb(81, 88, 203)
HSLhsl(237, 54%, 56%)
HSVhsv(237, 60%, 80%)
CMYKcmyk(60.1%, 56.7%, 0%, 20.4%)
CIE-LABlab(42.82, 31.76, -60.78)
CIE-LCHlch(42.82, 68.58, 297.59°)
OKLaboklab(51.97% 0.0178 -0.1745)
OKLCHoklch(51.97% 0.175 275.8)
XYZxyz(17.6591, 13.0392, 58.0746)
Luminance0.1304 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5158CB #CBC451
analogous
#5195CB #5158CB #8751CB
triadic
#5158CB #CB5158 #58CB51
tetradic
#5158CB #CB5195 #CBC451 #51CB87
square
#5158CB #CB5195 #CBC451 #51CB87
split-complementary
#5158CB #CB8751 #95CB51
monochromatic
#252A7C #333AAC #5158CB #8085D9 #AFB2E7

Accessibility & contrast

On white

5.82
#5158CB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.61
#5158CB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5158CB
5.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5158CB#FFFFFF#000000##FFFFFF
##5158CB1.005.823.615.82
#FFFFFF5.821.0021.001.00
#0000003.6121.001.0021.00
##FFFFFF5.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006ACF
Deuteranopia (green-blind)
#0060C9
Tritanopia (blue-blind)
#007389
Achromatopsia (no color)
#656565

Design tokens & code

CSS
--color: #5158cb;
/* rgb */ color: rgb(81, 88, 203);
/* oklch */ color: oklch(52.0% 0.175 275.8);
Tailwind
colors: {
  custom: {
    50: '#8d87dc',
    500: '#5158cb',
    950: '#000000',
  },
}
SCSS
$custom: #5158cb;
$custom-light: #8d87dc;
$custom-dark: #000000;
JSON
{
  "hex": "#5158cb",
  "rgb": {
    "r": 81,
    "g": 88,
    "b": 203
  },
  "hsl": {
    "h": 236.557,
    "s": 53.982,
    "l": 55.686
  },
  "oklch": {
    "l": 0.51969,
    "c": 0.17542,
    "h": 275.8
  },
  "luminance": 0.13041
}

Semantic roles & 50–950 ramp

primary
#5158CB
secondary
#D5D2A3
accent
#D54ADD
background
#F9F8FD
surface
#F2EFFB
border
#CCCAD4
text
#0D0B15
muted
#7E7C83

Preview Lab

Preview with #5158CB

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

Preview Lab → · Contrast checker → · Palette generator →

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