#1F40AB#1F40AB

#1F40AB is a dark, vivid blue. Relative luminance 0.069; OKLCH L 42.1% C 0.175 H 265.7°. Best body text is #FFFFFF at 8.83:1 contrast (WCAG AA passes).

Color values

HEX#1F40AB
RGBrgb(31, 64, 171)
HSLhsl(226, 69%, 40%)
HSVhsv(226, 82%, 67%)
CMYKcmyk(81.9%, 62.6%, 0%, 32.9%)
CIE-LABlab(31.57, 28.98, -60.42)
CIE-LCHlch(31.57, 67.02, 295.62°)
OKLaboklab(42.11% -0.013 -0.1749)
OKLCHoklch(42.11% 0.175 265.7)
XYZxyz(9.7466, 6.8972, 39.3378)
Luminance0.0690 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F40AB #AB8A1F
analogous
#1F86AB #1F40AB #441FAB
triadic
#1F40AB #AB1F40 #40AB1F
tetradic
#1F40AB #AB1F86 #AB8A1F #1FAB44
square
#1F40AB #AB1F86 #AB8A1F #1FAB44
split-complementary
#1F40AB #AB441F #86AB1F
monochromatic
#0C1943 #162D77 #1F40AB #2E56D9 #6280E3

Accessibility & contrast

On white

8.83
#1F40AB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.38
#1F40AB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F40AB
8.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F40AB#FFFFFF#000000##FFFFFF
##1F40AB1.008.832.388.83
#FFFFFF8.831.0021.001.00
#0000002.3821.001.0021.00
##FFFFFF8.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0051AE
Deuteranopia (green-blind)
#0044A9
Tritanopia (blue-blind)
#005C6F
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #1f40ab;
/* rgb */ color: rgb(31, 64, 171);
/* oklch */ color: oklch(42.1% 0.175 265.7);
Tailwind
colors: {
  custom: {
    50: '#7474c5',
    500: '#1f40ab',
    950: '#000000',
  },
}
SCSS
$custom: #1f40ab;
$custom-light: #7474c5;
$custom-dark: #000000;
JSON
{
  "hex": "#1f40ab",
  "rgb": {
    "r": 31,
    "g": 64,
    "b": 171
  },
  "hsl": {
    "h": 225.857,
    "s": 69.307,
    "l": 39.608
  },
  "oklch": {
    "l": 0.42109,
    "c": 0.17534,
    "h": 265.7
  },
  "luminance": 0.06898
}

Semantic roles & 50–950 ramp

primary
#1F40AB
secondary
#C7AF5E
accent
#C33CEC
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #1F40AB

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

Preview Lab → · Contrast checker → · Palette generator →

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