#5170E1#5170E1

#5170E1 is a mid, vivid blue. Relative luminance 0.188; OKLCH L 58.2% C 0.175 H 268.9°. Best body text is #000000 at 4.75:1 contrast (WCAG AA passes).

Color values

HEX#5170E1
RGBrgb(81, 112, 225)
HSLhsl(227, 71%, 60%)
HSVhsv(227, 64%, 88%)
CMYKcmyk(64%, 50.2%, 0%, 11.8%)
CIE-LABlab(50.42, 24.26, -61.04)
CIE-LCHlch(50.42, 65.69, 291.68°)
OKLaboklab(58.15% -0.0035 -0.175)
OKLCHoklch(58.15% 0.175 268.9)
XYZxyz(22.7735, 18.7719, 73.6428)
Luminance0.1877 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5170E1 #E1C251
analogous
#51B8E1 #5170E1 #7A51E1
triadic
#5170E1 #E15170 #70E151
tetradic
#5170E1 #E151B8 #E1C251 #51E17A
square
#5170E1 #E151B8 #E1C251 #51E17A
split-complementary
#5170E1 #E17A51 #B8E151
monochromatic
#1B379D #2449D1 #5170E1 #859BEA #B9C6F3

Accessibility & contrast

On white

4.42
#5170E1 on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

4.75
#5170E1 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #5170E1
4.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5170E1#FFFFFF#000000##000000
##5170E11.004.424.754.75
#FFFFFF4.421.0021.0021.00
#0000004.7521.001.001.00
##0000004.7521.001.001.00

Color blindness preview

Protanopia (red-blind)
#2F7FE5
Deuteranopia (green-blind)
#0072DF
Tritanopia (blue-blind)
#008A9E
Achromatopsia (no color)
#787878

Design tokens & code

CSS
--color: #5170e1;
/* rgb */ color: rgb(81, 112, 225);
/* oklch */ color: oklch(58.2% 0.175 268.9);
Tailwind
colors: {
  custom: {
    50: '#9098eb',
    500: '#5170e1',
    950: '#000000',
  },
}
SCSS
$custom: #5170e1;
$custom-light: #9098eb;
$custom-dark: #000000;
JSON
{
  "hex": "#5170e1",
  "rgb": {
    "r": 81,
    "g": 112,
    "b": 225
  },
  "hsl": {
    "h": 227.083,
    "s": 70.588,
    "l": 60
  },
  "oklch": {
    "l": 0.58152,
    "c": 0.17505,
    "h": 268.9
  },
  "luminance": 0.18774
}

Semantic roles & 50–950 ramp

primary
#5170E1
secondary
#E3D7AB
accent
#C73AED
background
#F9F9FE
surface
#F2F2FD
border
#CCCCD5
text
#0E0D16
muted
#7E7E84

Preview Lab

Preview with #5170E1

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

Preview Lab → · Contrast checker → · Palette generator →

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