#1F40A8#1F40A8

#1F40A8 is a dark, vivid blue. Relative luminance 0.068; OKLCH L 41.8% C 0.171 H 265.6°. Best body text is #FFFFFF at 8.91:1 contrast (WCAG AA passes).

Color values

HEX#1F40A8
RGBrgb(31, 64, 168)
HSLhsl(226, 69%, 39%)
HSVhsv(226, 82%, 66%)
CMYKcmyk(81.5%, 61.9%, 0%, 34.1%)
CIE-LABlab(31.31, 27.82, -59.06)
CIE-LCHlch(31.31, 65.28, 295.23°)
OKLaboklab(41.83% -0.013 -0.1708)
OKLCHoklch(41.83% 0.171 265.6)
XYZxyz(9.4639, 6.7841, 37.8489)
Luminance0.0678 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F40A8 #A8871F
analogous
#1F85A8 #1F40A8 #421FA8
triadic
#1F40A8 #A81F40 #40A81F
tetradic
#1F40A8 #A81F85 #A8871F #1FA842
square
#1F40A8 #A81F85 #A8871F #1FA842
split-complementary
#1F40A8 #A8421F #85A81F
monochromatic
#0C1941 #152C74 #1F40A8 #2C56D8 #607FE2

Accessibility & contrast

On white

8.91
#1F40A8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.36
#1F40A8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F40A8
8.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F40A8#FFFFFF#000000##FFFFFF
##1F40A81.008.912.368.91
#FFFFFF8.911.0021.001.00
#0000002.3621.001.0021.00
##FFFFFF8.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0050AB
Deuteranopia (green-blind)
#0043A6
Tritanopia (blue-blind)
#005B6E
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #1f40a8;
/* rgb */ color: rgb(31, 64, 168);
/* oklch */ color: oklch(41.8% 0.171 265.6);
Tailwind
colors: {
  custom: {
    50: '#7374c3',
    500: '#1f40a8',
    950: '#000000',
  },
}
SCSS
$custom: #1f40a8;
$custom-light: #7374c3;
$custom-dark: #000000;
JSON
{
  "hex": "#1f40a8",
  "rgb": {
    "r": 31,
    "g": 64,
    "b": 168
  },
  "hsl": {
    "h": 225.547,
    "s": 68.844,
    "l": 39.02
  },
  "oklch": {
    "l": 0.41834,
    "c": 0.17135,
    "h": 265.6
  },
  "luminance": 0.06785
}

Semantic roles & 50–950 ramp

primary
#1F40A8
secondary
#C6AD5D
accent
#C13CEC
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #1F40A8

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

Preview Lab → · Contrast checker → · Palette generator →

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