#1F40B4#1F40B4

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

Color values

HEX#1F40B4
RGBrgb(31, 64, 180)
HSLhsl(227, 71%, 41%)
HSVhsv(227, 83%, 71%)
CMYKcmyk(82.8%, 64.4%, 0%, 29.4%)
CIE-LABlab(32.37, 32.42, -64.47)
CIE-LCHlch(32.37, 72.16, 296.69°)
OKLaboklab(42.95% -0.0131 -0.1867)
OKLCHoklch(42.95% 0.187 266)
XYZxyz(10.6338, 7.2521, 44.0105)
Luminance0.0725 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F40B4 #B4931F
analogous
#1F8BB4 #1F40B4 #481FB4
triadic
#1F40B4 #B41F40 #40B41F
tetradic
#1F40B4 #B41F8B #B4931F #1FB448
square
#1F40B4 #B41F8B #B4931F #1FB448
split-complementary
#1F40B4 #B4481F #8BB41F
monochromatic
#0D1B4C #162D80 #1F40B4 #3459DC #6884E5

Accessibility & contrast

On white

8.57
#1F40B4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.45
#1F40B4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F40B4
8.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F40B4#FFFFFF#000000##FFFFFF
##1F40B41.008.572.458.57
#FFFFFF8.571.0021.001.00
#0000002.4521.001.0021.00
##FFFFFF8.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0053B8
Deuteranopia (green-blind)
#0045B2
Tritanopia (blue-blind)
#005F74
Achromatopsia (no color)
#4C4C4C

Design tokens & code

CSS
--color: #1f40b4;
/* rgb */ color: rgb(31, 64, 180);
/* oklch */ color: oklch(42.9% 0.187 266.0);
Tailwind
colors: {
  custom: {
    50: '#7674cb',
    500: '#1f40b4',
    950: '#000000',
  },
}
SCSS
$custom: #1f40b4;
$custom-light: #7674cb;
$custom-dark: #000000;
JSON
{
  "hex": "#1f40b4",
  "rgb": {
    "r": 31,
    "g": 64,
    "b": 180
  },
  "hsl": {
    "h": 226.711,
    "s": 70.616,
    "l": 41.373
  },
  "oklch": {
    "l": 0.42949,
    "c": 0.18716,
    "h": 266
  },
  "luminance": 0.07253
}

Semantic roles & 50–950 ramp

primary
#1F40B4
secondary
#CBB464
accent
#C63AED
background
#F7F7FC
surface
#EEEDF9
border
#C9C8D2
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #1F40B4

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

Preview Lab → · Contrast checker → · Palette generator →

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