#5158C8#5158C8

#5158C8 is a mid, vivid blue. Relative luminance 0.129; OKLCH L 51.7% C 0.171 H 275.9°. Best body text is #FFFFFF at 5.87:1 contrast (WCAG AA passes).

Color values

HEX#5158C8
RGBrgb(81, 88, 200)
HSLhsl(236, 52%, 55%)
HSVhsv(236, 60%, 78%)
CMYKcmyk(59.5%, 56%, 0%, 21.6%)
CIE-LABlab(42.61, 30.76, -59.39)
CIE-LCHlch(42.61, 66.89, 297.38°)
OKLaboklab(51.74% 0.0177 -0.1704)
OKLCHoklch(51.74% 0.171 275.9)
XYZxyz(17.3050, 12.8976, 56.2100)
Luminance0.1290 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5158C8 #C8C151
analogous
#5193C8 #5158C8 #8651C8
triadic
#5158C8 #C85158 #58C851
tetradic
#5158C8 #C85193 #C8C151 #51C886
square
#5158C8 #C85193 #C8C151 #51C886
split-complementary
#5158C8 #C88651 #93C851
monochromatic
#262B79 #353CA7 #5158C8 #8085D7 #AEB1E5

Accessibility & contrast

On white

5.87
#5158C8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.58
#5158C8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5158C8
5.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5158C8#FFFFFF#000000##FFFFFF
##5158C81.005.873.585.87
#FFFFFF5.871.0021.001.00
#0000003.5821.001.0021.00
##FFFFFF5.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006ACC
Deuteranopia (green-blind)
#0060C6
Tritanopia (blue-blind)
#007287
Achromatopsia (no color)
#656565

Design tokens & code

CSS
--color: #5158c8;
/* rgb */ color: rgb(81, 88, 200);
/* oklch */ color: oklch(51.7% 0.171 275.9);
Tailwind
colors: {
  custom: {
    50: '#8d87d9',
    500: '#5158c8',
    950: '#000000',
  },
}
SCSS
$custom: #5158c8;
$custom-light: #8d87d9;
$custom-dark: #000000;
JSON
{
  "hex": "#5158c8",
  "rgb": {
    "r": 81,
    "g": 88,
    "b": 200
  },
  "hsl": {
    "h": 236.471,
    "s": 51.965,
    "l": 55.098
  },
  "oklch": {
    "l": 0.51742,
    "c": 0.17136,
    "h": 275.9
  },
  "luminance": 0.12899
}

Semantic roles & 50–950 ramp

primary
#5158C8
secondary
#D3D0A1
accent
#D34CDB
background
#F9F8FD
surface
#F1EFFB
border
#CBCAD4
text
#0D0B15
muted
#7E7C83

Preview Lab

Preview with #5158C8

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

Preview Lab → · Contrast checker → · Palette generator →

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