#5170D2#5170D2

#5170D2 is a mid, vivid blue. Relative luminance 0.180; OKLCH L 57.1% C 0.155 H 268.1°. Best body text is #000000 at 4.60:1 contrast (WCAG AA passes).

Color values

HEX#5170D2
RGBrgb(81, 112, 210)
HSLhsl(226, 59%, 57%)
HSVhsv(226, 61%, 82%)
CMYKcmyk(61.4%, 46.7%, 0%, 17.6%)
CIE-LABlab(49.48, 19.13, -54.05)
CIE-LCHlch(49.48, 57.34, 289.49°)
OKLaboklab(57.14% -0.0052 -0.1545)
OKLCHoklch(57.14% 0.155 268.1)
XYZxyz(20.8164, 17.9890, 63.3355)
Luminance0.1799 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5170D2 #D2B351
analogous
#51B1D2 #5170D2 #7251D2
triadic
#5170D2 #D25170 #70D251
tetradic
#5170D2 #D251B1 #D2B351 #51D272
square
#5170D2 #D251B1 #D2B351 #51D272
split-complementary
#5170D2 #D27251 #B1D251
monochromatic
#233B86 #2F50B7 #5170D2 #8298DF #B2C0EB

Accessibility & contrast

On white

4.57
#5170D2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.60
#5170D2 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #5170D2
4.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5170D2#FFFFFF#000000##000000
##5170D21.004.574.604.60
#FFFFFF4.571.0021.0021.00
#0000004.6021.001.001.00
##0000004.6021.001.001.00

Color blindness preview

Protanopia (red-blind)
#407CD6
Deuteranopia (green-blind)
#2A70D0
Tritanopia (blue-blind)
#008697
Achromatopsia (no color)
#767676

Design tokens & code

CSS
--color: #5170d2;
/* rgb */ color: rgb(81, 112, 210);
/* oklch */ color: oklch(57.1% 0.155 268.1);
Tailwind
colors: {
  custom: {
    50: '#8d98e0',
    500: '#5170d2',
    950: '#000000',
  },
}
SCSS
$custom: #5170d2;
$custom-light: #8d98e0;
$custom-dark: #000000;
JSON
{
  "hex": "#5170d2",
  "rgb": {
    "r": 81,
    "g": 112,
    "b": 210
  },
  "hsl": {
    "h": 225.581,
    "s": 58.904,
    "l": 57.059
  },
  "oklch": {
    "l": 0.57139,
    "c": 0.15455,
    "h": 268.1
  },
  "luminance": 0.17991
}

Semantic roles & 50–950 ramp

primary
#5170D2
secondary
#DACDA5
accent
#BD46E2
background
#F9F9FD
surface
#F1F2FB
border
#CBCCD4
text
#0D0D15
muted
#7E7E83

Preview Lab

Preview with #5170D2

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

Preview Lab → · Contrast checker → · Palette generator →

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