Skip to content

#2f1ba3

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

RGB
47, 27, 163
HSL
249°, 72%, 37%
CMYK
71, 83, 0, 36
Luminance
0.0403

At a glance

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

Hex
#2f1ba3
Hue
249°
blue
Saturation
72%
vivid
Lightness
37%
dark
Brightness
64%
HSV value
Perceived
25%
weighted brightness
Luminance
0.0403
WCAG relative
Temperature
Cool
78/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
11.62:1
Closest name
Medium Blue
ΔE2000 5.3
Where it sits
Hue249° of 360°
Saturation72%
Lightness37%
Temperature
Warm ← → Cool78% 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#2f1ba3
RGBrgb(47, 27, 163)
HSLhsl(249, 72%, 37%)
CMYKcmyk(71%, 83%, 0%, 36%)
LABlab(23.8 49.2 -68.4)
LCHlch(23.8 84.3 305.7)
OKLCHoklch(0.365 0.199 276.7)
Decimal3087267
Display P3color(display-p3 0.184 0.106 0.639)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f1ba3 on white: 11.62:1
AA ✓ pass · AA-large · AAA
Aa
#2f1ba3 on black: 1.81:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #003EA7
deuteranopia · #0033A1
tritanopia · #004661

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #2f1ba3 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
#EAE7F8
#CFC9F3
#AB9FEF
#806FE7
#563EDF
#3C23D2
#2f1ba3
#28178C
#211566
#140D3F
Base = 700Lightest = 50 · #F4F3FCDarkest = 950 · #140D3F
:root {
  --brand-50: #F4F3FC;
  --brand-100: #EAE7F8;
  --brand-200: #CFC9F3;
  --brand-300: #AB9FEF;
  --brand-400: #806FE7;
  --brand-500: #563EDF;
  --brand-600: #3C23D2;
  --brand-700: #2f1ba3;
  --brand-800: #28178C;
  --brand-900: #211566;
  --brand-950: #140D3F;
  --brand: #2f1ba3;
  --brand-ink: #ffffff;
}

Colors that work with #2f1ba3

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#B3A319
Second voice, not a rival
Dark variant#1F126D
Hover, pressed, headers
Light variant#ECE9FB
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 #2f1ba3

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#8FA31B
Analogous left#1B4BA3
Analogous right#731BA3
Split-complement 1#A3731B
Split-complement 2#4BA31B
Triadic 1#A32F1B
Triadic 2#1BA32F
Tetradic#A31B4B

RGB percentages

Red18.4%
Green10.6%
Blue63.9%

CMYK percentages

Cyan71.2%
Magenta83.4%
Yellow0.0%
Key (black)36.1%

Color previews

#2f1ba3 text on a black background

contrast 1.81:1

Card sample

#2f1ba3 text on a white background

contrast 11.62:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #2f1ba3

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.

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

#2f1ba3, answered

What color is #2f1ba3?

#2f1ba3 is a dark vivid blue, closest to Medium Blue (ΔE2000 5.3). It sits at 249° on the hue wheel with 72% saturation and 37% lightness, which reads as cool.

What is the RGB value of #2f1ba3?

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

Is #2f1ba3 a light or a dark color?

It is a dark color. Relative luminance is 0.0403 and perceived brightness is 25%, so white text on it reaches 11.62:1.

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

White. It scores 11.62:1 against #2f1ba3, versus 1.81:1 for black — AAA at any size.

What is the complementary color of #2f1ba3?

#8FA31B sits directly opposite on the wheel. Softer options are the split-complements #A3731B and #4BA31B, which give the same contrast with far less vibration.

What colors go well with #2f1ba3?

For interface work: #F5F4FA as the surface, #C6C0ED for borders, #564B9B for secondary text, #B3A319 as an accent and #1F126D for hover and pressed states. For a palette, the analogous pair #1B4BA3 and #731BA3 stays calm, while #8FA31B is the loudest partner.

What is #2f1ba3 in CMYK for printing?

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

Is #2f1ba3 warm or cool?

Cool — it scores 78 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #611BA3; nudged cooler, #1938A5.

Work with #2f1ba3 in the Color Lab