Skip to content

#021d49

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

RGB
2, 29, 73
HSL
217°, 95%, 15%
CMYK
97, 60, 0, 71
Luminance
0.0137

At a glance

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

Hex
#021d49
Hue
217°
blue
Saturation
95%
electric
Lightness
15%
deep
Brightness
29%
HSV value
Perceived
13%
weighted brightness
Luminance
0.0137
WCAG relative
Temperature
Cool
96/100 cool
Color family
Blue
Tone
Electric
Best ink
White
16.48:1
Closest name
Midnight Blue
ΔE2000 9
Where it sits
Hue217° of 360°
Saturation95%
Lightness15%
Temperature
Warm ← → Cool96% 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#021d49
RGBrgb(2, 29, 73)
HSLhsl(217, 95%, 15%)
CMYKcmyk(97%, 60%, 0%, 71%)
LABlab(11.8 10.2 -30.2)
LCHlch(11.8 31.9 288.6)
OKLCHoklch(0.243 0.089 259.2)
Decimal138569
Display P3color(display-p3 0.008 0.114 0.286)

Copy-ready code

/* CSS */
color: #021d49;
background-color: #021d49;
/* Tailwind (arbitrary) */
class="text-[#021d49] bg-[#021d49]"
/* SCSS */
$brand: #021d49;
/* SwiftUI */
Color(red: 0.008, green: 0.114, blue: 0.286)
/* Android */
Color.parseColor("#021d49")
/* Flutter */
Color(0xFF021D49)
/* Python / OpenCV (BGR) */
(73, 29, 2)

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 #021d49 · 16.48:1
Use #ffffffAAA at every size.
Aa
White text · 16.48:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.27:1
AA fail · AA large fail · AAA fail
Reading the other direction: #021d49 as text scores 16.48:1 on white and 1.27:1 on black.

Accessibility — WCAG contrast

Aa
#021d49 on white: 16.48:1
AA ✓ pass · AA-large · AAA
Aa
#021d49 on black: 1.27:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #00224B
deuteranopia · #001C48
tritanopia · #00282F

Color scale — 50 to 950

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

#F1F6FD
#E4EDFB
#C2D7FA
#92BAFC
#5B98FB
#2575F9
#065FEE
#054FC7
#043F9F
#083073
#021d49
Base = 950Lightest = 50 · #F1F6FDDarkest = 950 · #021d49
:root {
  --brand-50: #F1F6FD;
  --brand-100: #E4EDFB;
  --brand-200: #C2D7FA;
  --brand-300: #92BAFC;
  --brand-400: #5B98FB;
  --brand-500: #2575F9;
  --brand-600: #065FEE;
  --brand-700: #054FC7;
  --brand-800: #043F9F;
  --brand-900: #083073;
  --brand-950: #021d49;
  --brand: #021d49;
  --brand-ink: #ffffff;
}

Colors that work with #021d49

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#F4F7FA
Tinted page background
Border#C0D1ED
Hairlines and dividers
Muted text#4B699B
Captions on the surface
Accent#4A1C00
Second voice, not a rival
Dark variant#03317C
Hover, pressed, headers
Light variant#E6EFFE
Selected rows, tints
Dark surface#141A24
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 #021d49

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

Works well for
  • Body text and links on white
  • Primary buttons and calls to action
  • Focus rings, active and selected states
  • Headers, footers and dark-mode surfaces
  • Brand accents, badges and data highlights
Use with care
  • Text on black or near-black surfaces
  • Full-page backgrounds — tiring over long sessions
  • 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#492E02
Analogous left#024049
Analogous right#0B0249
Split-complement 1#490B02
Split-complement 2#404902
Triadic 1#49021D
Triadic 2#1D4902
Tetradic#490240

RGB percentages

Red0.8%
Green11.4%
Blue28.6%

CMYK percentages

Cyan97.3%
Magenta60.3%
Yellow0.0%
Key (black)71.4%

Color previews

#021d49 text on a black background

contrast 1.27:1

Card sample

#021d49 text on a white background

contrast 16.48:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #021d49;
Background color
Panel with #021d49 background
background-color: #021d49;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #021d49;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(2, 29, 73, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(2, 29, 73, 0.45);
Border & gradient
Gradient panel
border: 3px solid #021d49;
background: linear-gradient(135deg, #021d49, #160249);

Monochromatic scale

Palettes built from #021d49

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.

#021d49 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

Sits outside most CMYK gamuts — expect a duller press result, or specify a spot ink.

#021d49, answered

What color is #021d49?

#021d49 is a deep electric blue, closest to Midnight Blue (ΔE2000 9). It sits at 217° on the hue wheel with 95% saturation and 15% lightness, which reads as cool.

What is the RGB value of #021d49?

rgb(2, 29, 73) — 2 red, 29 green and 73 blue out of 255, or 0.8% / 11.4% / 28.6% by channel.

Is #021d49 a light or a dark color?

It is a dark color. Relative luminance is 0.0137 and perceived brightness is 13%, so white text on it reaches 16.48:1.

Should I use black or white text on #021d49?

White. It scores 16.48:1 against #021d49, versus 1.27:1 for black — AAA at any size.

What is the complementary color of #021d49?

#492E02 sits directly opposite on the wheel. Softer options are the split-complements #490B02 and #404902, which give the same contrast with far less vibration.

What colors go well with #021d49?

For interface work: #F4F7FA as the surface, #C0D1ED for borders, #4B699B for secondary text, #4A1C00 as an accent and #03317C for hover and pressed states. For a palette, the analogous pair #024049 and #0B0249 stays calm, while #492E02 is the loudest partner.

What is #021d49 in CMYK for printing?

cmyk(97%, 60%, 0%, 71%). This is a screen-to-ink approximation — a color this saturated sits outside most CMYK gamuts and will print duller than it looks here.

Is #021d49 warm or cool?

Cool — it scores 96 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #020349; nudged cooler, #011631.

Work with #021d49 in the Color Lab