#5170E4#5170E4

#5170E4 is a mid, vivid blue. Relative luminance 0.189; OKLCH L 58.4% C 0.179 H 269.0°. Best body text is #000000 at 4.79:1 contrast (WCAG AA passes).

Color values

HEX#5170E4
RGBrgb(81, 112, 228)
HSLhsl(227, 73%, 61%)
HSVhsv(227, 64%, 89%)
CMYKcmyk(64.5%, 50.9%, 0%, 10.6%)
CIE-LABlab(50.61, 25.29, -62.42)
CIE-LCHlch(50.61, 67.35, 292.06°)
OKLaboklab(58.36% -0.0032 -0.1791)
OKLCHoklch(58.36% 0.179 269)
XYZxyz(23.1863, 18.9370, 75.8170)
Luminance0.1894 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5170E4 #E4C551
analogous
#51B9E4 #5170E4 #7B51E4
triadic
#5170E4 #E45170 #70E451
tetradic
#5170E4 #E451B9 #E4C551 #51E47B
square
#5170E4 #E451B9 #E4C551 #51E47B
split-complementary
#5170E4 #E47B51 #B9E451
monochromatic
#1936A2 #2148D7 #5170E4 #869CEC #BBC7F4

Accessibility & contrast

On white

4.39
#5170E4 on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

4.79
#5170E4 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #5170E4
4.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5170E4#FFFFFF#000000##000000
##5170E41.004.394.794.79
#FFFFFF4.391.0021.0021.00
#0000004.7921.001.001.00
##0000004.7921.001.001.00

Color blindness preview

Protanopia (red-blind)
#2B7FE8
Deuteranopia (green-blind)
#0072E2
Tritanopia (blue-blind)
#008B9F
Achromatopsia (no color)
#787878

Design tokens & code

CSS
--color: #5170e4;
/* rgb */ color: rgb(81, 112, 228);
/* oklch */ color: oklch(58.4% 0.179 269.0);
Tailwind
colors: {
  custom: {
    50: '#9098ed',
    500: '#5170e4',
    950: '#000000',
  },
}
SCSS
$custom: #5170e4;
$custom-light: #9098ed;
$custom-dark: #000000;
JSON
{
  "hex": "#5170e4",
  "rgb": {
    "r": 81,
    "g": 112,
    "b": 228
  },
  "hsl": {
    "h": 227.347,
    "s": 73.134,
    "l": 60.588
  },
  "oklch": {
    "l": 0.58361,
    "c": 0.1791,
    "h": 269
  },
  "luminance": 0.18939
}

Semantic roles & 50–950 ramp

primary
#5170E4
secondary
#E4D9AC
accent
#AC10D5
background
#F9F9FE
surface
#F2F2FD
border
#CCCCD5
text
#0E0D16
muted
#7E7E84

Preview Lab

Preview with #5170E4

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

Preview Lab → · Contrast checker → · Palette generator →

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