#5158CF#5158CF

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

Color values

HEX#5158CF
RGBrgb(81, 88, 207)
HSLhsl(237, 57%, 56%)
HSVhsv(237, 61%, 81%)
CMYKcmyk(60.9%, 57.5%, 0%, 18.8%)
CIE-LABlab(43.11, 33.09, -62.61)
CIE-LCHlch(43.11, 70.82, 297.86°)
OKLaboklab(52.28% 0.0178 -0.1799)
OKLCHoklch(52.28% 0.181 275.7)
XYZxyz(18.1419, 13.2323, 60.6175)
Luminance0.1323 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5158CF #CFC851
analogous
#5197CF #5158CF #8951CF
triadic
#5158CF #CF5158 #58CF51
tetradic
#5158CF #CF5197 #CFC851 #51CF89
square
#5158CF #CF5197 #CFC851 #51CF89
split-complementary
#5158CF #CF8951 #97CF51
monochromatic
#242982 #3138B2 #5158CF #8186DC #B1B4E9

Accessibility & contrast

On white

5.76
#5158CF on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.65
#5158CF on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5158CF
5.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5158CF#FFFFFF#000000##FFFFFF
##5158CF1.005.763.655.76
#FFFFFF5.761.0021.001.00
#0000003.6521.001.0021.00
##FFFFFF5.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006BD3
Deuteranopia (green-blind)
#0061CD
Tritanopia (blue-blind)
#00758B
Achromatopsia (no color)
#666666

Design tokens & code

CSS
--color: #5158cf;
/* rgb */ color: rgb(81, 88, 207);
/* oklch */ color: oklch(52.3% 0.181 275.7);
Tailwind
colors: {
  custom: {
    50: '#8e87de',
    500: '#5158cf',
    950: '#000000',
  },
}
SCSS
$custom: #5158cf;
$custom-light: #8e87de;
$custom-dark: #000000;
JSON
{
  "hex": "#5158cf",
  "rgb": {
    "r": 81,
    "g": 88,
    "b": 207
  },
  "hsl": {
    "h": 236.667,
    "s": 56.757,
    "l": 56.471
  },
  "oklch": {
    "l": 0.52275,
    "c": 0.1808,
    "h": 275.7
  },
  "luminance": 0.13234
}

Semantic roles & 50–950 ramp

primary
#5158CF
secondary
#D8D5A4
accent
#D848E0
background
#F9F8FD
surface
#F2EFFB
border
#CCCAD4
text
#0D0B15
muted
#7E7C83

Preview Lab

Preview with #5158CF

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

Preview Lab → · Contrast checker → · Palette generator →

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