#1F51B4#1F51B4

#1F51B4 is a mid, vivid blue. Relative luminance 0.095; OKLCH L 46.3% C 0.167 H 262.0°. Best body text is #FFFFFF at 7.26:1 contrast (WCAG AA passes).

Color values

HEX#1F51B4
RGBrgb(31, 81, 180)
HSLhsl(220, 71%, 41%)
HSVhsv(220, 83%, 71%)
CMYKcmyk(82.8%, 55%, 0%, 29.4%)
CIE-LABlab(36.87, 21.12, -57.13)
CIE-LCHlch(36.87, 60.91, 290.29°)
OKLaboklab(46.32% -0.0231 -0.1649)
OKLCHoklch(46.32% 0.167 262)
XYZxyz(11.7428, 9.4700, 44.3802)
Luminance0.0947 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F51B4 #B4821F
analogous
#1F9CB4 #1F51B4 #381FB4
triadic
#1F51B4 #B41F51 #51B41F
tetradic
#1F51B4 #B41F9C #B4821F #1FB438
square
#1F51B4 #B41F9C #B4821F #1FB438
split-complementary
#1F51B4 #B4381F #9CB41F
monochromatic
#0D224C #163A80 #1F51B4 #346CDC #6892E5

Accessibility & contrast

On white

7.26
#1F51B4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.89
#1F51B4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F51B4
7.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F51B4#FFFFFF#000000##FFFFFF
##1F51B41.007.262.897.26
#FFFFFF7.261.0021.001.00
#0000002.8921.001.0021.00
##FFFFFF7.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005EB7
Deuteranopia (green-blind)
#0050B2
Tritanopia (blue-blind)
#006A7A
Achromatopsia (no color)
#575757

Design tokens & code

CSS
--color: #1f51b4;
/* rgb */ color: rgb(31, 81, 180);
/* oklch */ color: oklch(46.3% 0.167 262.0);
Tailwind
colors: {
  custom: {
    50: '#7581cb',
    500: '#1f51b4',
    950: '#000000',
  },
}
SCSS
$custom: #1f51b4;
$custom-light: #7581cb;
$custom-dark: #000000;
JSON
{
  "hex": "#1f51b4",
  "rgb": {
    "r": 31,
    "g": 81,
    "b": 180
  },
  "hsl": {
    "h": 219.866,
    "s": 70.616,
    "l": 41.373
  },
  "oklch": {
    "l": 0.46315,
    "c": 0.1665,
    "h": 262
  },
  "luminance": 0.09471
}

Semantic roles & 50–950 ramp

primary
#1F51B4
secondary
#CBA864
accent
#B13AED
background
#F7F7FC
surface
#EEEEF9
border
#C9C9D2
text
#0A0A13
muted
#7C7C82

Preview Lab

Preview with #1F51B4

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

Preview Lab → · Contrast checker → · Palette generator →

#1F51B4 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva