#5171E4#5171E4

#5171E4 is a mid, vivid blue. Relative luminance 0.192; OKLCH L 58.6% C 0.178 H 268.7°. Best body text is #000000 at 4.83:1 contrast (WCAG AA passes).

Color values

HEX#5171E4
RGBrgb(81, 113, 228)
HSLhsl(227, 73%, 61%)
HSVhsv(227, 64%, 89%)
CMYKcmyk(64.5%, 50.4%, 0%, 10.6%)
CIE-LABlab(50.87, 24.67, -62.00)
CIE-LCHlch(50.87, 66.73, 291.70°)
OKLaboklab(58.56% -0.0041 -0.1778)
OKLCHoklch(58.56% 0.178 268.7)
XYZxyz(23.2973, 19.1589, 75.8540)
Luminance0.1916 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5171E4 #E4C451
analogous
#51BAE4 #5171E4 #7A51E4
triadic
#5171E4 #E45171 #71E451
tetradic
#5171E4 #E451BA #E4C451 #51E47A
square
#5171E4 #E451BA #E4C451 #51E47A
split-complementary
#5171E4 #E47A51 #BAE451
monochromatic
#1937A2 #2149D7 #5171E4 #869CEC #BBC7F4

Accessibility & contrast

On white

4.35
#5171E4 on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

4.83
#5171E4 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #5171E4
4.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5171E4#FFFFFF#000000##000000
##5171E41.004.354.834.83
#FFFFFF4.351.0021.0021.00
#0000004.8321.001.001.00
##0000004.8321.001.001.00

Color blindness preview

Protanopia (red-blind)
#2E80E8
Deuteranopia (green-blind)
#0073E2
Tritanopia (blue-blind)
#008CA0
Achromatopsia (no color)
#797979

Design tokens & code

CSS
--color: #5171e4;
/* rgb */ color: rgb(81, 113, 228);
/* oklch */ color: oklch(58.6% 0.178 268.7);
Tailwind
colors: {
  custom: {
    50: '#9099ed',
    500: '#5171e4',
    950: '#000000',
  },
}
SCSS
$custom: #5171e4;
$custom-light: #9099ed;
$custom-dark: #000000;
JSON
{
  "hex": "#5171e4",
  "rgb": {
    "r": 81,
    "g": 113,
    "b": 228
  },
  "hsl": {
    "h": 226.939,
    "s": 73.134,
    "l": 60.588
  },
  "oklch": {
    "l": 0.58558,
    "c": 0.17788,
    "h": 268.7
  },
  "luminance": 0.19161
}

Semantic roles & 50–950 ramp

primary
#5171E4
secondary
#E4D8AC
accent
#AA10D5
background
#F9F9FE
surface
#F2F2FD
border
#CCCCD5
text
#0E0D16
muted
#7E7E84

Preview Lab

Preview with #5171E4

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

Preview Lab → · Contrast checker → · Palette generator →

#5171E4 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva