Skip to content

#2f188b

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

RGB
47, 24, 139
HSL
252°, 71%, 32%
CMYK
66, 83, 0, 46
Luminance
0.0312

At a glance

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

Hex
#2f188b
Hue
252°
blue
Saturation
71%
vivid
Lightness
32%
dark
Brightness
55%
HSV value
Perceived
22%
weighted brightness
Luminance
0.0312
WCAG relative
Temperature
Cool
77/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
12.93:1
Closest name
Dark Blue
ΔE2000 4.7
Where it sits
Hue252° of 360°
Saturation71%
Lightness32%
Temperature
Warm ← → Cool77% 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#2f188b
RGBrgb(47, 24, 139)
HSLhsl(252, 71%, 32%)
CMYKcmyk(66%, 83%, 0%, 46%)
LABlab(20.5 43.4 -59.0)
LCHlch(20.5 73.2 306.3)
OKLCHoklch(0.334 0.173 280.7)
Decimal3086475
Display P3color(display-p3 0.184 0.094 0.545)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f188b on white: 12.93:1
AA ✓ pass · AA-large · AAA
Aa
#2f188b on black: 1.62:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #00358E
deuteranopia · #002D89
tritanopia · #003B52

Color scale — 50 to 950

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

#F5F3FC
#EBE7F8
#D1C9F2
#AF9FEF
#876FE6
#5F40DE
#4724D1
#3B1EAE
#2f188b
#251565
#170D3F
Base = 800Lightest = 50 · #F5F3FCDarkest = 950 · #170D3F
:root {
  --brand-50: #F5F3FC;
  --brand-100: #EBE7F8;
  --brand-200: #D1C9F2;
  --brand-300: #AF9FEF;
  --brand-400: #876FE6;
  --brand-500: #5F40DE;
  --brand-600: #4724D1;
  --brand-700: #3B1EAE;
  --brand-800: #2f188b;
  --brand-900: #251565;
  --brand-950: #170D3F;
  --brand: #2f188b;
  --brand-ink: #ffffff;
}

Colors that work with #2f188b

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#F6F4FA
Tinted page background
Border#C9C0ED
Hairlines and dividers
Muted text#5B4B9B
Captions on the surface
Accent#8E8815
Second voice, not a rival
Dark variant#25136D
Hover, pressed, headers
Light variant#EDE9FB
Selected rows, tints
Dark surface#171424
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 #2f188b

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#748B18
Analogous left#183B8B
Analogous right#69188B
Split-complement 1#8B6918
Split-complement 2#3B8B18
Triadic 1#8B2F18
Triadic 2#188B2F
Tetradic#8B183B

RGB percentages

Red18.4%
Green9.4%
Blue54.5%

CMYK percentages

Cyan66.2%
Magenta82.7%
Yellow0.0%
Key (black)45.5%

Color previews

#2f188b text on a black background

contrast 1.62:1

Card sample

#2f188b text on a white background

contrast 12.93:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(47, 24, 139, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(47, 24, 139, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2f188b;
background: linear-gradient(135deg, #2f188b, #7C188B);

Monochromatic scale

Palettes built from #2f188b

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.

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

#2f188b, answered

What color is #2f188b?

#2f188b is a dark vivid blue, closest to Dark Blue (ΔE2000 4.7). It sits at 252° on the hue wheel with 71% saturation and 32% lightness, which reads as cool.

What is the RGB value of #2f188b?

rgb(47, 24, 139) — 47 red, 24 green and 139 blue out of 255, or 18.4% / 9.4% / 54.5% by channel.

Is #2f188b a light or a dark color?

It is a dark color. Relative luminance is 0.0312 and perceived brightness is 22%, so white text on it reaches 12.93:1.

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

White. It scores 12.93:1 against #2f188b, versus 1.62:1 for black — AAA at any size.

What is the complementary color of #2f188b?

#748B18 sits directly opposite on the wheel. Softer options are the split-complements #8B6918 and #3B8B18, which give the same contrast with far less vibration.

What colors go well with #2f188b?

For interface work: #F6F4FA as the surface, #C9C0ED for borders, #5B4B9B for secondary text, #8E8815 as an accent and #25136D for hover and pressed states. For a palette, the analogous pair #183B8B and #69188B stays calm, while #748B18 is the loudest partner.

What is #2f188b in CMYK for printing?

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

Is #2f188b warm or cool?

Cool — it scores 77 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #59188B; nudged cooler, #162A8D.

Work with #2f188b in the Color Lab