Skip to content

#1f2d49

a deep, soft blue · cool · closest name: Midnight Blue

RGB
31, 45, 73
HSL
220°, 40%, 20%
CMYK
58, 38, 0, 71
Luminance
0.0265

At a glance

Every number on this page in one read: what #1f2d49 is made of, how bright it looks, and which way it leans.

Hex
#1f2d49
Hue
220°
blue
Saturation
40%
soft
Lightness
20%
deep
Brightness
29%
HSV value
Perceived
18%
weighted brightness
Luminance
0.0265
WCAG relative
Temperature
Cool
94/100 cool
Color family
Blue
Tone
Soft
Best ink
White
13.73:1
Closest name
Midnight Blue
ΔE2000 11.7
Where it sits
Hue220° of 360°
Saturation40%
Lightness20%
Temperature
Warm ← → Cool94% cool

Reads cool. Warm and cool siblings keep the same lightness, so you can swap one in without redoing your contrast maths.

Every format

HEX#1f2d49
RGBrgb(31, 45, 73)
HSLhsl(220, 40%, 20%)
CMYKcmyk(58%, 38%, 0%, 71%)
LABlab(18.6 3.6 -19.2)
LCHlch(18.6 19.6 280.7)
OKLCHoklch(0.299 0.055 263.3)
Decimal2043209
Display P3color(display-p3 0.122 0.176 0.286)

Copy-ready code

/* CSS */
color: #1f2d49;
background-color: #1f2d49;
/* Tailwind (arbitrary) */
class="text-[#1f2d49] bg-[#1f2d49]"
/* SCSS */
$brand: #1f2d49;
/* SwiftUI */
Color(red: 0.122, green: 0.176, blue: 0.286)
/* Android */
Color.parseColor("#1f2d49")
/* Flutter */
Color(0xFF1F2D49)
/* Python / OpenCV (BGR) */
(73, 45, 31)

Best text color

Only one of black and white can be right. This is the one, with the number that proves it.

Readable at a glance#ffffff on #1f2d49 · 13.73:1
Use #ffffffAAA at every size.
Aa
White text · 13.73:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.53:1
AA fail · AA large fail · AAA fail
Reading the other direction: #1f2d49 as text scores 13.73:1 on white and 1.53:1 on black.

Accessibility — WCAG contrast

Aa
#1f2d49 on white: 13.73:1
AA ✓ pass · AA-large · AAA
Aa
#1f2d49 on black: 1.53:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #222F4A
deuteranopia · #1D2B48
tritanopia · #0B3337

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #1f2d49 is pinned to step 900; the rest hold its hue and let saturation ease off at the extremes so the pale end never turns neon.

#F5F7FA
#EBEEF5
#D2DAEA
#B0BFDE
#89A0CD
#6180BC
#496AAC
#3D588F
#314773
#1f2d49
#182234
Base = 900Lightest = 50 · #F5F7FADarkest = 950 · #182234
:root {
  --brand-50: #F5F7FA;
  --brand-100: #EBEEF5;
  --brand-200: #D2DAEA;
  --brand-300: #B0BFDE;
  --brand-400: #89A0CD;
  --brand-500: #6180BC;
  --brand-600: #496AAC;
  --brand-700: #3D588F;
  --brand-800: #314773;
  --brand-900: #1f2d49;
  --brand-950: #182234;
  --brand: #1f2d49;
  --brand-ink: #ffffff;
}

Colors that work with #1f2d49

Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.

Text on it#ffffff
White wins here
Surface#F4F6FA
Tinted page background
Border#C6D1E7
Hairlines and dividers
Muted text#4B659B
Captions on the surface
Accent#4B301D
Second voice, not a rival
Dark variant#26375A
Hover, pressed, headers
Light variant#EDF1F7
Selected rows, tints
Dark surface#141924
Dark-mode background
Light mode
Everything in its place

Surface, border, heading and body all derive from this one hue, so the screen stays coherent without a second palette.

Primary actionSecondaryBadge
Dark mode
Same hue, inverted

Lightness flips, hue holds. The accent stays the anchor in both themes.

Primary actionSecondaryAccent

How to use #1f2d49

Derived from its contrast, chroma and lightness — not from taste.

Works well for
  • Body text and links on white
  • Charts, tags and secondary surfaces
  • Headers, footers and dark-mode surfaces
  • Brand accents, badges and data highlights
Use with care
  • Text on black or near-black surfaces
  • Black text placed on it
  • Pairing with a same-lightness hue — edges vibrate

Similar colors

One move away from this hex in each direction. Every swatch is its own page.

Color relationships

The wheel positions with their names attached, so you can grab the one you actually need.

Complementary#493B1F
Analogous left#1F4249
Analogous right#261F49
Split-complement 1#49261F
Split-complement 2#42491F
Triadic 1#491F2D
Triadic 2#2D491F
Tetradic#491F42

RGB percentages

Red12.2%
Green17.6%
Blue28.6%

CMYK percentages

Cyan57.5%
Magenta38.4%
Yellow0.0%
Key (black)71.4%

Color previews

#1f2d49 text on a black background

contrast 1.53:1

Card sample

#1f2d49 text on a white background

contrast 13.73:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #1f2d49;
Background color
Panel with #1f2d49 background
background-color: #1f2d49;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #1f2d49;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(31, 45, 73, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(31, 45, 73, 0.45);
Border & gradient
Gradient panel
border: 3px solid #1f2d49;
background: linear-gradient(135deg, #1f2d49, #2D1F49);

Monochromatic scale

Palettes built from #1f2d49

Shades — darker

Tints — lighter

Color harmonies

Nearest named colors

Ranked with CIEDE2000 across all 139 CSS keywords. Under ΔE 2 the eye stops telling them apart; over ΔE 10 they are plainly different colors.

#1f2d49 in the real world

Where a color in this family tends to land, and the interface roles it is usually asked to play.

Industries
TechnologyFinanceHealthcareEnterprise SaaS
Common UI roles
ButtonsLinksFocus statesCharts
Print note

Converts to four-color process without much drama. Proof it anyway.

#1f2d49, answered

What color is #1f2d49?

#1f2d49 is a deep soft blue, closest to Midnight Blue (ΔE2000 11.7). It sits at 220° on the hue wheel with 40% saturation and 20% lightness, which reads as cool.

What is the RGB value of #1f2d49?

rgb(31, 45, 73) — 31 red, 45 green and 73 blue out of 255, or 12.2% / 17.6% / 28.6% by channel.

Is #1f2d49 a light or a dark color?

It is a dark color. Relative luminance is 0.0265 and perceived brightness is 18%, so white text on it reaches 13.73:1.

Should I use black or white text on #1f2d49?

White. It scores 13.73:1 against #1f2d49, versus 1.53:1 for black — AAA at any size.

What is the complementary color of #1f2d49?

#493B1F sits directly opposite on the wheel. Softer options are the split-complements #49261F and #42491F, which give the same contrast with far less vibration.

What colors go well with #1f2d49?

For interface work: #F4F6FA as the surface, #C6D1E7 for borders, #4B659B for secondary text, #4B301D as an accent and #26375A for hover and pressed states. For a palette, the analogous pair #1F4249 and #261F49 stays calm, while #493B1F is the loudest partner.

What is #1f2d49 in CMYK for printing?

cmyk(58%, 38%, 0%, 71%). This is a screen-to-ink approximation — ask your printer for a proof before committing to a run.

Is #1f2d49 warm or cool?

Cool — it scores 94 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #201F49; nudged cooler, #1E324A.

Work with #1f2d49 in the Color Lab