#1F40B3#1F40B3

#1F40B3 is a dark, vivid blue. Relative luminance 0.072; OKLCH L 42.9% C 0.186 H 266.0°. Best body text is #FFFFFF at 8.60:1 contrast (WCAG AA passes).

Color values

HEX#1F40B3
RGBrgb(31, 64, 179)
HSLhsl(227, 70%, 41%)
HSVhsv(227, 83%, 70%)
CMYKcmyk(82.7%, 64.2%, 0%, 29.8%)
CIE-LABlab(32.28, 32.04, -64.03)
CIE-LCHlch(32.28, 71.60, 296.58°)
OKLaboklab(42.86% -0.0131 -0.1854)
OKLCHoklch(42.86% 0.186 266)
XYZxyz(10.5323, 7.2115, 43.4759)
Luminance0.0721 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F40B3 #B3921F
analogous
#1F8AB3 #1F40B3 #481FB3
triadic
#1F40B3 #B31F40 #40B31F
tetradic
#1F40B3 #B31F8A #B3921F #1FB348
square
#1F40B3 #B31F8A #B3921F #1FB348
split-complementary
#1F40B3 #B3481F #8AB31F
monochromatic
#0D1B4B #162D7F #1F40B3 #3359DC #6884E5

Accessibility & contrast

On white

8.60
#1F40B3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.44
#1F40B3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F40B3
8.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F40B3#FFFFFF#000000##FFFFFF
##1F40B31.008.602.448.60
#FFFFFF8.601.0021.001.00
#0000002.4421.001.0021.00
##FFFFFF8.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0053B7
Deuteranopia (green-blind)
#0045B1
Tritanopia (blue-blind)
#005F73
Achromatopsia (no color)
#4C4C4C

Design tokens & code

CSS
--color: #1f40b3;
/* rgb */ color: rgb(31, 64, 179);
/* oklch */ color: oklch(42.9% 0.186 266.0);
Tailwind
colors: {
  custom: {
    50: '#7674cb',
    500: '#1f40b3',
    950: '#000000',
  },
}
SCSS
$custom: #1f40b3;
$custom-light: #7674cb;
$custom-dark: #000000;
JSON
{
  "hex": "#1f40b3",
  "rgb": {
    "r": 31,
    "g": 64,
    "b": 179
  },
  "hsl": {
    "h": 226.622,
    "s": 70.476,
    "l": 41.176
  },
  "oklch": {
    "l": 0.42855,
    "c": 0.18586,
    "h": 266
  },
  "luminance": 0.07213
}

Semantic roles & 50–950 ramp

primary
#1F40B3
secondary
#CAB364
accent
#C53BED
background
#F7F7FC
surface
#EEEDF9
border
#C9C8D2
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #1F40B3

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

Preview Lab → · Contrast checker → · Palette generator →

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