#5157BA#5157BA

#5157BA is a mid, vivid blue. Relative luminance 0.121; OKLCH L 50.5% C 0.153 H 276.8°. Best body text is #FFFFFF at 6.14:1 contrast (WCAG AA passes).

Color values

HEX#5157BA
RGBrgb(81, 87, 186)
HSLhsl(237, 43%, 52%)
HSVhsv(237, 56%, 73%)
CMYKcmyk(56.5%, 53.2%, 0%, 27.1%)
CIE-LABlab(41.39, 26.75, -53.22)
CIE-LCHlch(41.39, 59.56, 296.68°)
OKLaboklab(50.52% 0.0182 -0.1523)
OKLCHoklch(50.52% 0.153 276.8)
XYZxyz(15.6616, 12.1098, 47.9570)
Luminance0.1211 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5157BA #BAB451
analogous
#518CBA #5157BA #7F51BA
triadic
#5157BA #BA5157 #57BA51
tetradic
#5157BA #BA518C #BAB451 #51BA7F
square
#5157BA #BA518C #BAB451 #51BA7F
split-complementary
#5157BA #BA7F51 #8CBA51
monochromatic
#292D68 #3A4093 #5157BA #7D81CB #A9ACDD

Accessibility & contrast

On white

6.14
#5157BA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.42
#5157BA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5157BA
6.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5157BA#FFFFFF#000000##FFFFFF
##5157BA1.006.143.426.14
#FFFFFF6.141.0021.001.00
#0000003.4221.001.0021.00
##FFFFFF6.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1D66BD
Deuteranopia (green-blind)
#015DB8
Tritanopia (blue-blind)
#166E80
Achromatopsia (no color)
#626262

Design tokens & code

CSS
--color: #5157ba;
/* rgb */ color: rgb(81, 87, 186);
/* oklch */ color: oklch(50.5% 0.153 276.8);
Tailwind
colors: {
  custom: {
    50: '#8b86cf',
    500: '#5157ba',
    950: '#000000',
  },
}
SCSS
$custom: #5157ba;
$custom-light: #8b86cf;
$custom-dark: #000000;
JSON
{
  "hex": "#5157ba",
  "rgb": {
    "r": 81,
    "g": 87,
    "b": 186
  },
  "hsl": {
    "h": 236.571,
    "s": 43.21,
    "l": 52.353
  },
  "oklch": {
    "l": 0.50524,
    "c": 0.15337,
    "h": 276.8
  },
  "luminance": 0.12111
}

Semantic roles & 50–950 ramp

primary
#5157BA
secondary
#CAC89D
accent
#CC55D3
background
#F8F8FC
surface
#F0EFF9
border
#CBCAD2
text
#0D0B14
muted
#7D7C82

Preview Lab

Preview with #5157BA

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

Preview Lab → · Contrast checker → · Palette generator →

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