Skip to content

#2f1bab

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

RGB
47, 27, 171
HSL
248°, 73%, 39%
CMYK
73, 84, 0, 33
Luminance
0.0433

At a glance

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

Hex
#2f1bab
Hue
248°
blue
Saturation
73%
vivid
Lightness
39%
dark
Brightness
67%
HSV value
Perceived
26%
weighted brightness
Luminance
0.0433
WCAG relative
Temperature
Cool
79/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
11.26:1
Closest name
Medium Blue
ΔE2000 4.5
Where it sits
Hue248° of 360°
Saturation73%
Lightness39%
Temperature
Warm ← → Cool79% 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#2f1bab
RGBrgb(47, 27, 171)
HSLhsl(248, 73%, 39%)
CMYKcmyk(73%, 84%, 0%, 33%)
LABlab(24.7 51.6 -71.7)
LCHlch(24.7 88.3 305.8)
OKLCHoklch(0.374 0.208 275.7)
Decimal3087275
Display P3color(display-p3 0.184 0.106 0.671)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f1bab on white: 11.26:1
AA ✓ pass · AA-large · AAA
Aa
#2f1bab on black: 1.87:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0041AF
deuteranopia · #0034A9
tritanopia · #004A65

Color scale — 50 to 950

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

#F4F3FC
#E9E7F8
#CFC9F3
#A99EF0
#7F6EE8
#543DE0
#3A21D3
#2f1bab
#27168D
#201466
#140D40
Base = 700Lightest = 50 · #F4F3FCDarkest = 950 · #140D40
:root {
  --brand-50: #F4F3FC;
  --brand-100: #E9E7F8;
  --brand-200: #CFC9F3;
  --brand-300: #A99EF0;
  --brand-400: #7F6EE8;
  --brand-500: #543DE0;
  --brand-600: #3A21D3;
  --brand-700: #2f1bab;
  --brand-800: #27168D;
  --brand-900: #201466;
  --brand-950: #140D40;
  --brand: #2f1bab;
  --brand-ink: #ffffff;
}

Colors that work with #2f1bab

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#F5F4FA
Tinted page background
Border#C6C0ED
Hairlines and dividers
Muted text#564B9B
Captions on the surface
Accent#B4A318
Second voice, not a rival
Dark variant#1E116E
Hover, pressed, headers
Light variant#ECE9FC
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 #2f1bab

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#97AB1B
Analogous left#1B4FAB
Analogous right#771BAB
Split-complement 1#AB771B
Split-complement 2#4FAB1B
Triadic 1#AB2F1B
Triadic 2#1BAB2F
Tetradic#AB1B4F

RGB percentages

Red18.4%
Green10.6%
Blue67.1%

CMYK percentages

Cyan72.5%
Magenta84.2%
Yellow0.0%
Key (black)32.9%

Color previews

#2f1bab text on a black background

contrast 1.87:1

Card sample

#2f1bab text on a white background

contrast 11.26:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(47, 27, 171, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(47, 27, 171, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2f1bab;
background: linear-gradient(135deg, #2f1bab, #8F1BAB);

Monochromatic scale

Palettes built from #2f1bab

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.

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

#2f1bab, answered

What color is #2f1bab?

#2f1bab is a dark vivid blue, closest to Medium Blue (ΔE2000 4.5). It sits at 248° on the hue wheel with 73% saturation and 39% lightness, which reads as cool.

What is the RGB value of #2f1bab?

rgb(47, 27, 171) — 47 red, 27 green and 171 blue out of 255, or 18.4% / 10.6% / 67.1% by channel.

Is #2f1bab a light or a dark color?

It is a dark color. Relative luminance is 0.0433 and perceived brightness is 26%, so white text on it reaches 11.26:1.

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

White. It scores 11.26:1 against #2f1bab, versus 1.87:1 for black — AAA at any size.

What is the complementary color of #2f1bab?

#97AB1B sits directly opposite on the wheel. Softer options are the split-complements #AB771B and #4FAB1B, which give the same contrast with far less vibration.

What colors go well with #2f1bab?

For interface work: #F5F4FA as the surface, #C6C0ED for borders, #564B9B for secondary text, #B4A318 as an accent and #1E116E for hover and pressed states. For a palette, the analogous pair #1B4FAB and #771BAB stays calm, while #97AB1B is the loudest partner.

What is #2f1bab in CMYK for printing?

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

Is #2f1bab warm or cool?

Cool — it scores 79 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #641BAB; nudged cooler, #193AAD.

Work with #2f1bab in the Color Lab