Skip to content

#2f2b4f

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

RGB
47, 43, 79
HSL
247°, 30%, 24%
CMYK
41, 46, 0, 69
Luminance
0.0290

At a glance

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

Hex
#2f2b4f
Hue
247°
blue
Saturation
30%
soft
Lightness
24%
deep
Brightness
31%
HSV value
Perceived
19%
weighted brightness
Luminance
0.0290
WCAG relative
Temperature
Cool
75/100 cool
Color family
Blue
Tone
Soft
Best ink
White
13.30:1
Closest name
Midnight Blue
ΔE2000 11.7
Where it sits
Hue247° of 360°
Saturation30%
Lightness24%
Temperature
Warm ← → Cool75% 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#2f2b4f
RGBrgb(47, 43, 79)
HSLhsl(247, 30%, 24%)
CMYKcmyk(41%, 46%, 0%, 69%)
LABlab(19.6 11.9 -21.6)
LCHlch(19.6 24.6 299.0)
OKLCHoklch(0.312 0.063 287.2)
Decimal3091279
Display P3color(display-p3 0.184 0.169 0.310)

Copy-ready code

/* CSS */
color: #2f2b4f;
background-color: #2f2b4f;
/* Tailwind (arbitrary) */
class="text-[#2f2b4f] bg-[#2f2b4f]"
/* SCSS */
$brand: #2f2b4f;
/* SwiftUI */
Color(red: 0.184, green: 0.169, blue: 0.310)
/* Android */
Color.parseColor("#2f2b4f")
/* Flutter */
Color(0xFF2F2B4F)
/* Python / OpenCV (BGR) */
(79, 43, 47)

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

Accessibility — WCAG contrast

Aa
#2f2b4f on white: 13.30:1
AA ✓ pass · AA-large · AAA
Aa
#2f2b4f on black: 1.58:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #1F3050
deuteranopia · #1F2F4E
tritanopia · #273239

Color scale — 50 to 950

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

#F6F6F9
#EDECF3
#D7D5E6
#BAB6D7
#9892C4
#756EB0
#5E569F
#4F4884
#3F3A6A
#2f2b4f
#1E1C31
Base = 900Lightest = 50 · #F6F6F9Darkest = 950 · #1E1C31
:root {
  --brand-50: #F6F6F9;
  --brand-100: #EDECF3;
  --brand-200: #D7D5E6;
  --brand-300: #BAB6D7;
  --brand-400: #9892C4;
  --brand-500: #756EB0;
  --brand-600: #5E569F;
  --brand-700: #4F4884;
  --brand-800: #3F3A6A;
  --brand-900: #2f2b4f;
  --brand-950: #1E1C31;
  --brand: #2f2b4f;
  --brand-ink: #ffffff;
}

Colors that work with #2f2b4f

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#F6F5FA
Tinted page background
Border#CDCAE2
Hairlines and dividers
Muted text#585195
Captions on the surface
Accent#514C29
Second voice, not a rival
Dark variant#312D53
Hover, pressed, headers
Light variant#EFEEF6
Selected rows, tints
Dark surface#161424
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 #2f2b4f

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#4B4F2B
Analogous left#2B394F
Analogous right#412B4F
Split-complement 1#4F412B
Split-complement 2#394F2B
Triadic 1#4F2F2B
Triadic 2#2B4F2F
Tetradic#4F2B39

RGB percentages

Red18.4%
Green16.9%
Blue31.0%

CMYK percentages

Cyan40.5%
Magenta45.6%
Yellow0.0%
Key (black)69.0%

Color previews

#2f2b4f text on a black background

contrast 1.58:1

Card sample

#2f2b4f text on a white background

contrast 13.30:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #2f2b4f;
Background color
Panel with #2f2b4f background
background-color: #2f2b4f;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(47, 43, 79, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(47, 43, 79, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2f2b4f;
background: linear-gradient(135deg, #2f2b4f, #472B4F);

Monochromatic scale

Palettes built from #2f2b4f

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.

#2f2b4f 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.

#2f2b4f, answered

What color is #2f2b4f?

#2f2b4f is a deep soft blue, closest to Midnight Blue (ΔE2000 11.7). It sits at 247° on the hue wheel with 30% saturation and 24% lightness, which reads as cool.

What is the RGB value of #2f2b4f?

rgb(47, 43, 79) — 47 red, 43 green and 79 blue out of 255, or 18.4% / 16.9% / 31% by channel.

Is #2f2b4f a light or a dark color?

It is a dark color. Relative luminance is 0.0290 and perceived brightness is 19%, so white text on it reaches 13.30:1.

Should I use black or white text on #2f2b4f?

White. It scores 13.30:1 against #2f2b4f, versus 1.58:1 for black — AAA at any size.

What is the complementary color of #2f2b4f?

#4B4F2B sits directly opposite on the wheel. Softer options are the split-complements #4F412B and #394F2B, which give the same contrast with far less vibration.

What colors go well with #2f2b4f?

For interface work: #F6F5FA as the surface, #CDCAE2 for borders, #585195 for secondary text, #514C29 as an accent and #312D53 for hover and pressed states. For a palette, the analogous pair #2B394F and #412B4F stays calm, while #4B4F2B is the loudest partner.

What is #2f2b4f in CMYK for printing?

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

Is #2f2b4f warm or cool?

Cool — it scores 75 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #3C2B4F; nudged cooler, #2A3450.

Work with #2f2b4f in the Color Lab