#1F40A6#1F40A6

#1F40A6 is a dark, vivid blue. Relative luminance 0.067; OKLCH L 41.7% C 0.169 H 265.6°. Best body text is #FFFFFF at 8.97:1 contrast (WCAG AA passes).

Color values

HEX#1F40A6
RGBrgb(31, 64, 166)
HSLhsl(225, 69%, 39%)
HSVhsv(225, 81%, 65%)
CMYKcmyk(81.3%, 61.4%, 0%, 34.9%)
CIE-LABlab(31.14, 27.05, -58.14)
CIE-LCHlch(31.14, 64.12, 294.95°)
OKLaboklab(41.65% -0.013 -0.1681)
OKLCHoklch(41.65% 0.169 265.6)
XYZxyz(9.2790, 6.7102, 36.8751)
Luminance0.0671 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F40A6 #A6851F
analogous
#1F83A6 #1F40A6 #411FA6
triadic
#1F40A6 #A61F40 #40A61F
tetradic
#1F40A6 #A61F83 #A6851F #1FA641
square
#1F40A6 #A61F83 #A6851F #1FA641
split-complementary
#1F40A6 #A6411F #83A61F
monochromatic
#0C183F #152C72 #1F40A6 #2B55D7 #5E7EE1

Accessibility & contrast

On white

8.97
#1F40A6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.34
#1F40A6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F40A6
8.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F40A6#FFFFFF#000000##FFFFFF
##1F40A61.008.972.348.97
#FFFFFF8.971.0021.001.00
#0000002.3421.001.0021.00
##FFFFFF8.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0050A9
Deuteranopia (green-blind)
#0043A4
Tritanopia (blue-blind)
#005A6C
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #1f40a6;
/* rgb */ color: rgb(31, 64, 166);
/* oklch */ color: oklch(41.7% 0.169 265.6);
Tailwind
colors: {
  custom: {
    50: '#7374c1',
    500: '#1f40a6',
    950: '#000000',
  },
}
SCSS
$custom: #1f40a6;
$custom-light: #7374c1;
$custom-dark: #000000;
JSON
{
  "hex": "#1f40a6",
  "rgb": {
    "r": 31,
    "g": 64,
    "b": 166
  },
  "hsl": {
    "h": 225.333,
    "s": 68.528,
    "l": 38.627
  },
  "oklch": {
    "l": 0.41653,
    "c": 0.16866,
    "h": 265.6
  },
  "luminance": 0.06711
}

Semantic roles & 50–950 ramp

primary
#1F40A6
secondary
#C5AC5B
accent
#C13CEB
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#090812
muted
#7B7B81

Preview Lab

Preview with #1F40A6

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

Preview Lab → · Contrast checker → · Palette generator →

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