#5158BA#5158BA

#5158BA is a mid, vivid blue. Relative luminance 0.123; OKLCH L 50.7% C 0.152 H 276.5°. Best body text is #FFFFFF at 6.08:1 contrast (WCAG AA passes).

Color values

HEX#5158BA
RGBrgb(81, 88, 186)
HSLhsl(236, 43%, 52%)
HSVhsv(236, 56%, 73%)
CMYKcmyk(56.5%, 52.7%, 0%, 27.1%)
CIE-LABlab(41.65, 26.12, -52.81)
CIE-LCHlch(41.65, 58.91, 296.31°)
OKLaboklab(50.72% 0.0171 -0.1511)
OKLCHoklch(50.72% 0.152 276.5)
XYZxyz(15.7432, 12.2729, 47.9842)
Luminance0.1227 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5158BA #BAB351
analogous
#518DBA #5158BA #7F51BA
triadic
#5158BA #BA5158 #58BA51
tetradic
#5158BA #BA518D #BAB351 #51BA7F
square
#5158BA #BA518D #BAB351 #51BA7F
split-complementary
#5158BA #BA7F51 #8DBA51
monochromatic
#292D68 #3A4093 #5158BA #7D82CB #A9ACDD

Accessibility & contrast

On white

6.08
#5158BA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.45
#5158BA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5158BA
6.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5158BA#FFFFFF#000000##FFFFFF
##5158BA1.006.083.456.08
#FFFFFF6.081.0021.001.00
#0000003.4521.001.0021.00
##FFFFFF6.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2067BD
Deuteranopia (green-blind)
#075EB8
Tritanopia (blue-blind)
#166E80
Achromatopsia (no color)
#626262

Design tokens & code

CSS
--color: #5158ba;
/* rgb */ color: rgb(81, 88, 186);
/* oklch */ color: oklch(50.7% 0.152 276.5);
Tailwind
colors: {
  custom: {
    50: '#8a87cf',
    500: '#5158ba',
    950: '#000000',
  },
}
SCSS
$custom: #5158ba;
$custom-light: #8a87cf;
$custom-dark: #000000;
JSON
{
  "hex": "#5158ba",
  "rgb": {
    "r": 81,
    "g": 88,
    "b": 186
  },
  "hsl": {
    "h": 236,
    "s": 43.21,
    "l": 52.353
  },
  "oklch": {
    "l": 0.50717,
    "c": 0.15203,
    "h": 276.5
  },
  "luminance": 0.12274
}

Semantic roles & 50–950 ramp

primary
#5158BA
secondary
#CAC79D
accent
#CB55D3
background
#F8F8FC
surface
#F0EFF9
border
#CBCAD2
text
#0D0B14
muted
#7D7C82

Preview Lab

Preview with #5158BA

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

Preview Lab → · Contrast checker → · Palette generator →

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