#5170F0#5170F0

#5170F0 is a mid, vivid blue. Relative luminance 0.196; OKLCH L 59.2% C 0.195 H 269.3°. Best body text is #000000 at 4.93:1 contrast (WCAG AA passes).

Color values

HEX#5170F0
RGBrgb(81, 112, 240)
HSLhsl(228, 84%, 63%)
HSVhsv(228, 66%, 94%)
CMYKcmyk(66.3%, 53.3%, 0%, 5.9%)
CIE-LABlab(51.41, 29.41, -67.85)
CIE-LCHlch(51.41, 73.95, 293.43°)
OKLaboklab(59.22% -0.0022 -0.1951)
OKLCHoklch(59.22% 0.195 269.3)
XYZxyz(24.9103, 19.6266, 84.8967)
Luminance0.1963 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5170F0 #F0D151
analogous
#51BFF0 #5170F0 #8151F0
triadic
#5170F0 #F05170 #70F051
tetradic
#5170F0 #F051BF #F0D151 #51F081
square
#5170F0 #F051BF #F0D151 #51F081
split-complementary
#5170F0 #F08151 #BFF051
monochromatic
#1030B7 #1942EB #5170F0 #899EF5 #C2CDFA

Accessibility & contrast

On white

4.26
#5170F0 on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

4.93
#5170F0 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #5170F0
4.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5170F0#FFFFFF#000000##000000
##5170F01.004.264.934.93
#FFFFFF4.261.0021.0021.00
#0000004.9321.001.001.00
##0000004.9321.001.001.00

Color blindness preview

Protanopia (red-blind)
#0E82F4
Deuteranopia (green-blind)
#0074ED
Tritanopia (blue-blind)
#008FA5
Achromatopsia (no color)
#7A7A7A

Design tokens & code

CSS
--color: #5170f0;
/* rgb */ color: rgb(81, 112, 240);
/* oklch */ color: oklch(59.2% 0.195 269.3);
Tailwind
colors: {
  custom: {
    50: '#9298f6',
    500: '#5170f0',
    950: '#000000',
  },
}
SCSS
$custom: #5170f0;
$custom-light: #9298f6;
$custom-dark: #000000;
JSON
{
  "hex": "#5170f0",
  "rgb": {
    "r": 81,
    "g": 112,
    "b": 240
  },
  "hsl": {
    "h": 228.302,
    "s": 84.127,
    "l": 62.941
  },
  "oklch": {
    "l": 0.59219,
    "c": 0.19507,
    "h": 269.3
  },
  "luminance": 0.19629
}

Semantic roles & 50–950 ramp

primary
#5170F0
secondary
#EBE0B2
accent
#B605E1
background
#F9F9FF
surface
#F2F2FF
border
#CCCCD7
text
#0E0D17
muted
#7E7E85

Preview Lab

Preview with #5170F0

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

Preview Lab → · Contrast checker → · Palette generator →

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