Skip to content

#28343f

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

RGB
40, 52, 63
HSL
209°, 22%, 20%
CMYK
37, 18, 0, 75
Luminance
0.0327

At a glance

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

Hex
#28343f
Hue
209°
blue
Saturation
22%
soft
Lightness
20%
deep
Brightness
25%
HSV value
Perceived
20%
weighted brightness
Luminance
0.0327
WCAG relative
Temperature
Cool
82/100 cool
Color family
Blue
Tone
Soft
Best ink
White
12.70:1
Closest name
Midnight Blue
ΔE2000 12.7
Where it sits
Hue209° of 360°
Saturation22%
Lightness20%
Temperature
Warm ← → Cool82% 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#28343f
RGBrgb(40, 52, 63)
HSLhsl(209, 22%, 20%)
CMYKcmyk(37%, 18%, 0%, 75%)
LABlab(21.1 -1.8 -8.5)
LCHlch(21.1 8.7 258.0)
OKLCHoklch(0.319 0.025 246.4)
Decimal2634815
Display P3color(display-p3 0.157 0.204 0.247)

Copy-ready code

/* CSS */
color: #28343f;
background-color: #28343f;
/* Tailwind (arbitrary) */
class="text-[#28343f] bg-[#28343f]"
/* SCSS */
$brand: #28343f;
/* SwiftUI */
Color(red: 0.157, green: 0.204, blue: 0.247)
/* Android */
Color.parseColor("#28343f")
/* Flutter */
Color(0xFF28343F)
/* Python / OpenCV (BGR) */
(63, 52, 40)

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

Accessibility — WCAG contrast

Aa
#28343f on white: 12.70:1
AA ✓ pass · AA-large · AAA
Aa
#28343f on black: 1.65:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #303440
deuteranopia · #2D323F
tritanopia · #213738

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #28343f 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.

#F6F7F9
#EDF0F2
#D7DEE4
#BAC7D3
#98ACBE
#7690A8
#5F7C96
#4F677D
#3F5264
#28343f
#1E272E
Base = 900Lightest = 50 · #F6F7F9Darkest = 950 · #1E272E
:root {
  --brand-50: #F6F7F9;
  --brand-100: #EDF0F2;
  --brand-200: #D7DEE4;
  --brand-300: #BAC7D3;
  --brand-400: #98ACBE;
  --brand-500: #7690A8;
  --brand-600: #5F7C96;
  --brand-700: #4F677D;
  --brand-800: #3F5264;
  --brand-900: #28343f;
  --brand-950: #1E272E;
  --brand: #28343f;
  --brand-ink: #ffffff;
}

Colors that work with #28343f

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#F6F7F9
Tinted page background
Border#CDD7DF
Hairlines and dividers
Muted text#59748C
Captions on the surface
Accent#412C26
Second voice, not a rival
Dark variant#32404E
Hover, pressed, headers
Light variant#EFF2F5
Selected rows, tints
Dark surface#161C22
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 #28343f

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#3F3328
Analogous left#283F3E
Analogous right#28293F
Split-complement 1#3F2829
Split-complement 2#3F3E28
Triadic 1#3F2834
Triadic 2#343F28
Tetradic#3E283F

RGB percentages

Red15.7%
Green20.4%
Blue24.7%

CMYK percentages

Cyan36.5%
Magenta17.5%
Yellow0.0%
Key (black)75.3%

Color previews

#28343f text on a black background

contrast 1.65:1

Card sample

#28343f text on a white background

contrast 12.70:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #28343f;
Background color
Panel with #28343f background
background-color: #28343f;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #28343f;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(40, 52, 63, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(40, 52, 63, 0.45);
Border & gradient
Gradient panel
border: 3px solid #28343f;
background: linear-gradient(135deg, #28343f, #2B283F);

Monochromatic scale

Palettes built from #28343f

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.

#28343f 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.

#28343f, answered

What color is #28343f?

#28343f is a deep soft blue, closest to Midnight Blue (ΔE2000 12.7). It sits at 209° on the hue wheel with 22% saturation and 20% lightness, which reads as cool.

What is the RGB value of #28343f?

rgb(40, 52, 63) — 40 red, 52 green and 63 blue out of 255, or 15.7% / 20.4% / 24.7% by channel.

Is #28343f a light or a dark color?

It is a dark color. Relative luminance is 0.0327 and perceived brightness is 20%, so white text on it reaches 12.70:1.

Should I use black or white text on #28343f?

White. It scores 12.70:1 against #28343f, versus 1.65:1 for black — AAA at any size.

What is the complementary color of #28343f?

#3F3328 sits directly opposite on the wheel. Softer options are the split-complements #3F2829 and #3F3E28, which give the same contrast with far less vibration.

What colors go well with #28343f?

For interface work: #F6F7F9 as the surface, #CDD7DF for borders, #59748C for secondary text, #412C26 as an accent and #32404E for hover and pressed states. For a palette, the analogous pair #283F3E and #28293F stays calm, while #3F3328 is the loudest partner.

What is #28343f in CMYK for printing?

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

Is #28343f warm or cool?

Cool — it scores 82 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #282C3F; nudged cooler, #1D2630.

Work with #28343f in the Color Lab