#5158CC#5158CC

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

Color values

HEX#5158CC
RGBrgb(81, 88, 204)
HSLhsl(237, 55%, 56%)
HSVhsv(237, 60%, 80%)
CMYKcmyk(60.3%, 56.9%, 0%, 20%)
CIE-LABlab(42.89, 32.10, -61.24)
CIE-LCHlch(42.89, 69.14, 297.66°)
OKLaboklab(52.04% 0.0178 -0.1759)
OKLCHoklch(52.04% 0.177 275.8)
XYZxyz(17.7786, 13.0870, 58.7042)
Luminance0.1309 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5158CC #CCC551
analogous
#5195CC #5158CC #8751CC
triadic
#5158CC #CC5158 #58CC51
tetradic
#5158CC #CC5195 #CCC551 #51CC87
square
#5158CC #CC5195 #CCC551 #51CC87
split-complementary
#5158CC #CC8751 #95CC51
monochromatic
#252A7E #333AAD #5158CC #8085DA #B0B3E8

Accessibility & contrast

On white

5.80
#5158CC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.62
#5158CC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5158CC
5.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5158CC#FFFFFF#000000##FFFFFF
##5158CC1.005.803.625.80
#FFFFFF5.801.0021.001.00
#0000003.6221.001.0021.00
##FFFFFF5.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006BD0
Deuteranopia (green-blind)
#0060CA
Tritanopia (blue-blind)
#007489
Achromatopsia (no color)
#656565

Design tokens & code

CSS
--color: #5158cc;
/* rgb */ color: rgb(81, 88, 204);
/* oklch */ color: oklch(52.0% 0.177 275.8);
Tailwind
colors: {
  custom: {
    50: '#8d87dc',
    500: '#5158cc',
    950: '#000000',
  },
}
SCSS
$custom: #5158cc;
$custom-light: #8d87dc;
$custom-dark: #000000;
JSON
{
  "hex": "#5158cc",
  "rgb": {
    "r": 81,
    "g": 88,
    "b": 204
  },
  "hsl": {
    "h": 236.585,
    "s": 54.667,
    "l": 55.882
  },
  "oklch": {
    "l": 0.52045,
    "c": 0.17677,
    "h": 275.8
  },
  "luminance": 0.13088
}

Semantic roles & 50–950 ramp

primary
#5158CC
secondary
#D6D3A3
accent
#D64ADE
background
#F9F8FD
surface
#F2EFFB
border
#CCCAD4
text
#0D0B15
muted
#7E7C83

Preview Lab

Preview with #5158CC

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

Preview Lab → · Contrast checker → · Palette generator →

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