#5158B2#5158B2

#5158B2 is a mid, vivid blue. Relative luminance 0.119; OKLCH L 50.2% C 0.141 H 276.7°. Best body text is #FFFFFF at 6.20:1 contrast (WCAG AA passes).

Color values

HEX#5158B2
RGBrgb(81, 88, 178)
HSLhsl(236, 39%, 51%)
HSVhsv(236, 54%, 70%)
CMYKcmyk(54.5%, 50.6%, 0%, 30.2%)
CIE-LABlab(41.12, 23.47, -48.96)
CIE-LCHlch(41.12, 54.29, 295.62°)
OKLaboklab(50.16% 0.0165 -0.1398)
OKLCHoklch(50.16% 0.141 276.7)
XYZxyz(14.9164, 11.9422, 43.6299)
Luminance0.1194 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5158B2 #B2AB51
analogous
#5188B2 #5158B2 #7A51B2
triadic
#5158B2 #B25158 #58B251
tetradic
#5158B2 #B25188 #B2AB51 #51B27A
square
#5158B2 #B25188 #B2AB51 #51B27A
split-complementary
#5158B2 #B27A51 #88B251
monochromatic
#2A2E5F #3D4289 #5158B2 #7B81C5 #A6A9D8

Accessibility & contrast

On white

6.20
#5158B2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.39
#5158B2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5158B2
6.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5158B2#FFFFFF#000000##FFFFFF
##5158B21.006.203.396.20
#FFFFFF6.201.0021.001.00
#0000003.3921.001.0021.00
##FFFFFF6.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2B65B5
Deuteranopia (green-blind)
#1E5DB0
Tritanopia (blue-blind)
#226C7C
Achromatopsia (no color)
#616161

Design tokens & code

CSS
--color: #5158b2;
/* rgb */ color: rgb(81, 88, 178);
/* oklch */ color: oklch(50.2% 0.141 276.7);
Tailwind
colors: {
  custom: {
    50: '#8987ca',
    500: '#5158b2',
    950: '#000000',
  },
}
SCSS
$custom: #5158b2;
$custom-light: #8987ca;
$custom-dark: #000000;
JSON
{
  "hex": "#5158b2",
  "rgb": {
    "r": 81,
    "g": 88,
    "b": 178
  },
  "hsl": {
    "h": 235.67,
    "s": 38.645,
    "l": 50.784
  },
  "oklch": {
    "l": 0.50156,
    "c": 0.14071,
    "h": 276.7
  },
  "luminance": 0.11943
}

Semantic roles & 50–950 ramp

primary
#5158B2
secondary
#C5C29A
accent
#C659CF
background
#F8F8FC
surface
#F0EFF8
border
#CBCAD1
text
#0C0B13
muted
#7D7C82

Preview Lab

Preview with #5158B2

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

Preview Lab → · Contrast checker → · Palette generator →

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