#5171D2#5171D2

#5171D2 is a mid, vivid blue. Relative luminance 0.182; OKLCH L 57.3% C 0.153 H 267.7°. Best body text is #000000 at 4.64:1 contrast (WCAG AA passes).

Color values

HEX#5171D2
RGBrgb(81, 113, 210)
HSLhsl(225, 59%, 57%)
HSVhsv(225, 61%, 82%)
CMYKcmyk(61.4%, 46.2%, 0%, 17.6%)
CIE-LABlab(49.75, 18.51, -53.62)
CIE-LCHlch(49.75, 56.73, 289.05°)
OKLaboklab(57.34% -0.0062 -0.1532)
OKLCHoklch(57.34% 0.153 267.7)
XYZxyz(20.9274, 18.2109, 63.3725)
Luminance0.1821 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5171D2 #D2B251
analogous
#51B2D2 #5171D2 #7251D2
triadic
#5171D2 #D25171 #71D251
tetradic
#5171D2 #D251B2 #D2B251 #51D272
square
#5171D2 #D251B2 #D2B251 #51D272
split-complementary
#5171D2 #D27251 #B2D251
monochromatic
#233B86 #2F51B7 #5171D2 #8299DF #B2C0EB

Accessibility & contrast

On white

4.52
#5171D2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.64
#5171D2 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #5171D2
4.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5171D2#FFFFFF#000000##000000
##5171D21.004.524.644.64
#FFFFFF4.521.0021.0021.00
#0000004.6421.001.001.00
##0000004.6421.001.001.00

Color blindness preview

Protanopia (red-blind)
#427CD6
Deuteranopia (green-blind)
#2C71D0
Tritanopia (blue-blind)
#008797
Achromatopsia (no color)
#767676

Design tokens & code

CSS
--color: #5171d2;
/* rgb */ color: rgb(81, 113, 210);
/* oklch */ color: oklch(57.3% 0.153 267.7);
Tailwind
colors: {
  custom: {
    50: '#8d99e0',
    500: '#5171d2',
    950: '#000000',
  },
}
SCSS
$custom: #5171d2;
$custom-light: #8d99e0;
$custom-dark: #000000;
JSON
{
  "hex": "#5171d2",
  "rgb": {
    "r": 81,
    "g": 113,
    "b": 210
  },
  "hsl": {
    "h": 225.116,
    "s": 58.904,
    "l": 57.059
  },
  "oklch": {
    "l": 0.57344,
    "c": 0.15331,
    "h": 267.7
  },
  "luminance": 0.18213
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #5171D2

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

Preview Lab → · Contrast checker → · Palette generator →

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