#1F40A1#1F40A1

#1F40A1 is a dark, vivid blue. Relative luminance 0.065; OKLCH L 41.2% C 0.162 H 265.3°. Best body text is #FFFFFF at 9.11:1 contrast (WCAG AA passes).

Color values

HEX#1F40A1
RGBrgb(31, 64, 161)
HSLhsl(225, 68%, 38%)
HSVhsv(225, 81%, 63%)
CMYKcmyk(80.7%, 60.2%, 0%, 36.9%)
CIE-LABlab(30.71, 25.10, -55.82)
CIE-LCHlch(30.71, 61.20, 294.21°)
OKLaboklab(41.2% -0.0131 -0.1613)
OKLCHoklch(41.2% 0.162 265.3)
XYZxyz(8.8292, 6.5303, 34.5064)
Luminance0.0653 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F40A1 #A1801F
analogous
#1F81A1 #1F40A1 #3F1FA1
triadic
#1F40A1 #A11F40 #40A11F
tetradic
#1F40A1 #A11F81 #A1801F #1FA13F
square
#1F40A1 #A11F81 #A1801F #1FA13F
split-complementary
#1F40A1 #A13F1F #81A11F
monochromatic
#0B173A #152C6E #1F40A1 #2954D4 #5B7DDF

Accessibility & contrast

On white

9.11
#1F40A1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.31
#1F40A1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F40A1
9.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F40A1#FFFFFF#000000##FFFFFF
##1F40A11.009.112.319.11
#FFFFFF9.111.0021.001.00
#0000002.3121.001.0021.00
##FFFFFF9.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004FA4
Deuteranopia (green-blind)
#00429F
Tritanopia (blue-blind)
#00596A
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #1f40a1;
/* rgb */ color: rgb(31, 64, 161);
/* oklch */ color: oklch(41.2% 0.162 265.3);
Tailwind
colors: {
  custom: {
    50: '#7174be',
    500: '#1f40a1',
    950: '#000000',
  },
}
SCSS
$custom: #1f40a1;
$custom-light: #7174be;
$custom-dark: #000000;
JSON
{
  "hex": "#1f40a1",
  "rgb": {
    "r": 31,
    "g": 64,
    "b": 161
  },
  "hsl": {
    "h": 224.769,
    "s": 67.708,
    "l": 37.647
  },
  "oklch": {
    "l": 0.41204,
    "c": 0.16188,
    "h": 265.3
  },
  "luminance": 0.06531
}

Semantic roles & 50–950 ramp

primary
#1F40A1
secondary
#C4A858
accent
#BF3DEB
background
#F7F7FB
surface
#EDEDF7
border
#C8C8D0
text
#090812
muted
#7B7B81

Preview Lab

Preview with #1F40A1

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

Preview Lab → · Contrast checker → · Palette generator →

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