#1F51A5#1F51A5

#1F51A5 is a mid, vivid blue. Relative luminance 0.089; OKLCH L 45.1% C 0.146 H 260.2°. Best body text is #FFFFFF at 7.56:1 contrast (WCAG AA passes).

Color values

HEX#1F51A5
RGBrgb(31, 81, 165)
HSLhsl(218, 68%, 38%)
HSVhsv(218, 81%, 65%)
CMYKcmyk(81.2%, 50.9%, 0%, 35.3%)
CIE-LABlab(35.77, 15.19, -50.00)
CIE-LCHlch(35.77, 52.26, 286.90°)
OKLaboklab(45.13% -0.0248 -0.1439)
OKLCHoklch(45.13% 0.146 260.2)
XYZxyz(10.2966, 8.8915, 36.7636)
Luminance0.0889 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F51A5 #A5731F
analogous
#1F94A5 #1F51A5 #301FA5
triadic
#1F51A5 #A51F51 #51A51F
tetradic
#1F51A5 #A51F94 #A5731F #1FA530
square
#1F51A5 #A51F94 #A5731F #1FA530
split-complementary
#1F51A5 #A5301F #94A51F
monochromatic
#0C1E3E #153871 #1F51A5 #2A6BD7 #5E8FE1

Accessibility & contrast

On white

7.56
#1F51A5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.78
#1F51A5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F51A5
7.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F51A5#FFFFFF#000000##FFFFFF
##1F51A51.007.562.787.56
#FFFFFF7.561.0021.001.00
#0000002.7821.001.0021.00
##FFFFFF7.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1C5BA8
Deuteranopia (green-blind)
#004EA3
Tritanopia (blue-blind)
#006573
Achromatopsia (no color)
#545454

Design tokens & code

CSS
--color: #1f51a5;
/* rgb */ color: rgb(31, 81, 165);
/* oklch */ color: oklch(45.1% 0.146 260.2);
Tailwind
colors: {
  custom: {
    50: '#7181c0',
    500: '#1f51a5',
    950: '#000000',
  },
}
SCSS
$custom: #1f51a5;
$custom-light: #7181c0;
$custom-dark: #000000;
JSON
{
  "hex": "#1f51a5",
  "rgb": {
    "r": 31,
    "g": 81,
    "b": 165
  },
  "hsl": {
    "h": 217.612,
    "s": 68.367,
    "l": 38.431
  },
  "oklch": {
    "l": 0.4513,
    "c": 0.14605,
    "h": 260.2
  },
  "luminance": 0.08893
}

Semantic roles & 50–950 ramp

primary
#1F51A5
secondary
#C59D5B
accent
#AA3DEB
background
#F7F7FB
surface
#EDEEF7
border
#C8C9D0
text
#090A12
muted
#7B7C81

Preview Lab

Preview with #1F51A5

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

Preview Lab → · Contrast checker → · Palette generator →

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