#5171F2#5171F2

#5171F2 is a mid, vivid blue. Relative luminance 0.200; OKLCH L 59.6% C 0.197 H 269.1°. Best body text is #000000 at 4.99:1 contrast (WCAG AA passes).

Color values

HEX#5171F2
RGBrgb(81, 113, 242)
HSLhsl(228, 86%, 63%)
HSVhsv(228, 67%, 95%)
CMYKcmyk(66.5%, 53.3%, 0%, 5.1%)
CIE-LABlab(51.80, 29.47, -68.34)
CIE-LCHlch(51.80, 74.42, 293.33°)
OKLaboklab(59.55% -0.003 -0.1965)
OKLCHoklch(59.55% 0.197 269.1)
XYZxyz(25.3200, 19.9680, 86.5070)
Luminance0.1997 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5171F2 #F2D251
analogous
#51C1F2 #5171F2 #8251F2
triadic
#5171F2 #F25171 #71F251
tetradic
#5171F2 #F251C1 #F2D251 #51F282
square
#5171F2 #F251C1 #F2D251 #51F282
split-complementary
#5171F2 #F28251 #C1F251
monochromatic
#0E30BB #1843EE #5171F2 #8A9FF6 #C3CEFB

Accessibility & contrast

On white

4.21
#5171F2 on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

4.99
#5171F2 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #5171F2
4.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5171F2#FFFFFF#000000##000000
##5171F21.004.214.994.99
#FFFFFF4.211.0021.0021.00
#0000004.9921.001.001.00
##0000004.9921.001.001.00

Color blindness preview

Protanopia (red-blind)
#0E83F6
Deuteranopia (green-blind)
#0074EF
Tritanopia (blue-blind)
#0090A7
Achromatopsia (no color)
#7B7B7B

Design tokens & code

CSS
--color: #5171f2;
/* rgb */ color: rgb(81, 113, 242);
/* oklch */ color: oklch(59.6% 0.197 269.1);
Tailwind
colors: {
  custom: {
    50: '#9399f7',
    500: '#5171f2',
    950: '#000000',
  },
}
SCSS
$custom: #5171f2;
$custom-light: #9399f7;
$custom-dark: #000000;
JSON
{
  "hex": "#5171f2",
  "rgb": {
    "r": 81,
    "g": 113,
    "b": 242
  },
  "hsl": {
    "h": 228.075,
    "s": 86.096,
    "l": 63.333
  },
  "oklch": {
    "l": 0.59554,
    "c": 0.1965,
    "h": 269.1
  },
  "luminance": 0.1997
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #5171F2

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

Preview Lab → · Contrast checker → · Palette generator →

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