Skip to content

#2f3f7f

a dark, vivid blue · cool · closest name: Dark Slate Blue

RGB
47, 63, 127
HSL
228°, 46%, 34%
CMYK
63, 50, 0, 50
Luminance
0.0569

At a glance

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

Hex
#2f3f7f
Hue
228°
blue
Saturation
46%
vivid
Lightness
34%
dark
Brightness
50%
HSV value
Perceived
27%
weighted brightness
Luminance
0.0569
WCAG relative
Temperature
Cool
90/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
9.82:1
Closest name
Dark Slate Blue
ΔE2000 5.9
Where it sits
Hue228° of 360°
Saturation46%
Lightness34%
Temperature
Warm ← → Cool90% 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#2f3f7f
RGBrgb(47, 63, 127)
HSLhsl(228, 46%, 34%)
CMYKcmyk(63%, 50%, 0%, 50%)
LABlab(28.6 15.0 -38.3)
LCHlch(28.6 41.1 291.4)
OKLCHoklch(0.390 0.110 270.1)
Decimal3096447
Display P3color(display-p3 0.184 0.247 0.498)

Copy-ready code

/* CSS */
color: #2f3f7f;
background-color: #2f3f7f;
/* Tailwind (arbitrary) */
class="text-[#2f3f7f] bg-[#2f3f7f]"
/* SCSS */
$brand: #2f3f7f;
/* SwiftUI */
Color(red: 0.184, green: 0.247, blue: 0.498)
/* Android */
Color.parseColor("#2f3f7f")
/* Flutter */
Color(0xFF2F3F7F)
/* Python / OpenCV (BGR) */
(127, 63, 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 #2f3f7f · 9.82:1
Use #ffffffAAA at every size.
Aa
White text · 9.82:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 2.14:1
AA fail · AA large fail · AAA fail
Reading the other direction: #2f3f7f as text scores 9.82:1 on white and 2.14:1 on black.

Accessibility — WCAG contrast

Aa
#2f3f7f on white: 9.82:1
AA ✓ pass · AA-large · AAA
Aa
#2f3f7f on black: 2.14:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #1E4781
deuteranopia · #0F407E
tritanopia · #004E59

Color scale — 50 to 950

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

#F5F6FA
#EAECF5
#D0D6EB
#ADB7E1
#8494D2
#5B70C2
#4259B3
#374A95
#2f3f7f
#232E57
#161D36
Base = 800Lightest = 50 · #F5F6FADarkest = 950 · #161D36
:root {
  --brand-50: #F5F6FA;
  --brand-100: #EAECF5;
  --brand-200: #D0D6EB;
  --brand-300: #ADB7E1;
  --brand-400: #8494D2;
  --brand-500: #5B70C2;
  --brand-600: #4259B3;
  --brand-700: #374A95;
  --brand-800: #2f3f7f;
  --brand-900: #232E57;
  --brand-950: #161D36;
  --brand: #2f3f7f;
  --brand-ink: #ffffff;
}

Colors that work with #2f3f7f

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#C3CBE9
Hairlines and dividers
Muted text#4B5B9B
Captions on the surface
Accent#825B2B
Second voice, not a rival
Dark variant#222E5D
Hover, pressed, headers
Light variant#ECEFF8
Selected rows, tints
Dark surface#141724
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 #2f3f7f

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#7F6F2F
Analogous left#2F677F
Analogous right#472F7F
Split-complement 1#7F472F
Split-complement 2#677F2F
Triadic 1#7F2F3F
Triadic 2#3F7F2F
Tetradic#7F2F67

RGB percentages

Red18.4%
Green24.7%
Blue49.8%

CMYK percentages

Cyan63.0%
Magenta50.4%
Yellow0.0%
Key (black)50.2%

Color previews

#2f3f7f text on a black background

contrast 2.14:1

Card sample

#2f3f7f text on a white background

contrast 9.82:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(47, 63, 127, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(47, 63, 127, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2f3f7f;
background: linear-gradient(135deg, #2f3f7f, #542F7F);

Monochromatic scale

Palettes built from #2f3f7f

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.

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

#2f3f7f, answered

What color is #2f3f7f?

#2f3f7f is a dark vivid blue, closest to Dark Slate Blue (ΔE2000 5.9). It sits at 228° on the hue wheel with 46% saturation and 34% lightness, which reads as cool.

What is the RGB value of #2f3f7f?

rgb(47, 63, 127) — 47 red, 63 green and 127 blue out of 255, or 18.4% / 24.7% / 49.8% by channel.

Is #2f3f7f a light or a dark color?

It is a dark color. Relative luminance is 0.0569 and perceived brightness is 27%, so white text on it reaches 9.82:1.

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

White. It scores 9.82:1 against #2f3f7f, versus 2.14:1 for black — AAA at any size.

What is the complementary color of #2f3f7f?

#7F6F2F sits directly opposite on the wheel. Softer options are the split-complements #7F472F and #677F2F, which give the same contrast with far less vibration.

What colors go well with #2f3f7f?

For interface work: #F4F6FA as the surface, #C3CBE9 for borders, #4B5B9B for secondary text, #825B2B as an accent and #222E5D for hover and pressed states. For a palette, the analogous pair #2F677F and #472F7F stays calm, while #7F6F2F is the loudest partner.

What is #2f3f7f in CMYK for printing?

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

Is #2f3f7f warm or cool?

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

Work with #2f3f7f in the Color Lab