#5170F2#5170F2

#5170F2 is a mid, vivid blue. Relative luminance 0.197; OKLCH L 59.4% C 0.198 H 269.4°. Best body text is #000000 at 4.95:1 contrast (WCAG AA passes).

Color values

HEX#5170F2
RGBrgb(81, 112, 242)
HSLhsl(228, 86%, 63%)
HSVhsv(228, 67%, 95%)
CMYKcmyk(66.5%, 53.7%, 0%, 5.1%)
CIE-LABlab(51.55, 30.09, -68.75)
CIE-LCHlch(51.55, 75.04, 293.64°)
OKLaboklab(59.37% -0.0021 -0.1977)
OKLCHoklch(59.37% 0.198 269.4)
XYZxyz(25.2090, 19.7461, 86.4700)
Luminance0.1975 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5170F2 #F2D351
analogous
#51C0F2 #5170F2 #8251F2
triadic
#5170F2 #F25170 #70F251
tetradic
#5170F2 #F251C0 #F2D351 #51F282
square
#5170F2 #F251C0 #F2D351 #51F282
split-complementary
#5170F2 #F28251 #C0F251
monochromatic
#0E2FBB #1841EE #5170F2 #8A9FF6 #C3CEFB

Accessibility & contrast

On white

4.24
#5170F2 on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

4.95
#5170F2 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #5170F2
4.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5170F2#FFFFFF#000000##000000
##5170F21.004.244.954.95
#FFFFFF4.241.0021.0021.00
#0000004.9521.001.001.00
##0000004.9521.001.001.00

Color blindness preview

Protanopia (red-blind)
#0482F7
Deuteranopia (green-blind)
#0074EF
Tritanopia (blue-blind)
#008FA6
Achromatopsia (no color)
#7B7B7B

Design tokens & code

CSS
--color: #5170f2;
/* rgb */ color: rgb(81, 112, 242);
/* oklch */ color: oklch(59.4% 0.198 269.4);
Tailwind
colors: {
  custom: {
    50: '#9398f7',
    500: '#5170f2',
    950: '#000000',
  },
}
SCSS
$custom: #5170f2;
$custom-light: #9398f7;
$custom-dark: #000000;
JSON
{
  "hex": "#5170f2",
  "rgb": {
    "r": 81,
    "g": 112,
    "b": 242
  },
  "hsl": {
    "h": 228.447,
    "s": 86.096,
    "l": 63.333
  },
  "oklch": {
    "l": 0.59365,
    "c": 0.1977,
    "h": 269.4
  },
  "luminance": 0.19748
}

Semantic roles & 50–950 ramp

primary
#5170F2
secondary
#ECE1B3
accent
#B803E3
background
#F9F9FF
surface
#F2F2FF
border
#CCCCD7
text
#0E0D17
muted
#7E7E85

Preview Lab

Preview with #5170F2

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

Preview Lab → · Contrast checker → · Palette generator →

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