Skip to content

#2f5ba3

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

RGB
47, 91, 163
HSL
217°, 55%, 41%
CMYK
71, 44, 0, 36
Luminance
0.1073

At a glance

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

Hex
#2f5ba3
Hue
217°
blue
Saturation
55%
vivid
Lightness
41%
dark
Brightness
64%
HSV value
Perceived
36%
weighted brightness
Luminance
0.1073
WCAG relative
Temperature
Cool
96/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
6.67:1
Closest name
Royal Blue
ΔE2000 9.6
Where it sits
Hue217° of 360°
Saturation55%
Lightness41%
Temperature
Warm ← → Cool96% 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#2f5ba3
RGBrgb(47, 91, 163)
HSLhsl(217, 55%, 41%)
CMYKcmyk(71%, 44%, 0%, 36%)
LABlab(39.1 9.9 -43.4)
LCHlch(39.1 44.5 282.8)
OKLCHoklch(0.478 0.126 259.8)
Decimal3103651
Display P3color(display-p3 0.184 0.357 0.639)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f5ba3 on white: 6.67:1
AA ✓ pass · AA-large · AAA
Aa
#2f5ba3 on black: 3.15:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #3862A6
deuteranopia · #2357A2
tritanopia · #006C77

Color scale — 50 to 950

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

#F4F7FB
#E9EEF6
#CEDAEE
#A8BFE6
#7CA0D9
#5180CD
#376ABE
#2f5ba3
#25477F
#1E365C
#13223A
Base = 700Lightest = 50 · #F4F7FBDarkest = 950 · #13223A
:root {
  --brand-50: #F4F7FB;
  --brand-100: #E9EEF6;
  --brand-200: #CEDAEE;
  --brand-300: #A8BFE6;
  --brand-400: #7CA0D9;
  --brand-500: #5180CD;
  --brand-600: #376ABE;
  --brand-700: #2f5ba3;
  --brand-800: #25477F;
  --brand-900: #1E365C;
  --brand-950: #13223A;
  --brand: #2f5ba3;
  --brand-ink: #ffffff;
}

Colors that work with #2f5ba3

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#F4F7FA
Tinted page background
Border#C0D1ED
Hairlines and dividers
Muted text#4B699B
Captions on the surface
Accent#A7592B
Second voice, not a rival
Dark variant#1D3763
Hover, pressed, headers
Light variant#EBF1F9
Selected rows, tints
Dark surface#141A24
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 #2f5ba3

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
  • 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#A3772F
Analogous left#2F95A3
Analogous right#3D2FA3
Split-complement 1#A33D2F
Split-complement 2#95A32F
Triadic 1#A32F5B
Triadic 2#5BA32F
Tetradic#A32F95

RGB percentages

Red18.4%
Green35.7%
Blue63.9%

CMYK percentages

Cyan71.2%
Magenta44.2%
Yellow0.0%
Key (black)36.1%

Color previews

#2f5ba3 text on a black background

contrast 3.15:1

Card sample

#2f5ba3 text on a white background

contrast 6.67:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #2f5ba3

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.

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

#2f5ba3, answered

What color is #2f5ba3?

#2f5ba3 is a dark vivid blue, closest to Royal Blue (ΔE2000 9.6). It sits at 217° on the hue wheel with 55% saturation and 41% lightness, which reads as cool.

What is the RGB value of #2f5ba3?

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

Is #2f5ba3 a light or a dark color?

It is a dark color. Relative luminance is 0.1073 and perceived brightness is 36%, so white text on it reaches 6.67:1.

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

White. It scores 6.67:1 against #2f5ba3, versus 3.15:1 for black — AA at any size.

What is the complementary color of #2f5ba3?

#A3772F sits directly opposite on the wheel. Softer options are the split-complements #A33D2F and #95A32F, which give the same contrast with far less vibration.

What colors go well with #2f5ba3?

For interface work: #F4F7FA as the surface, #C0D1ED for borders, #4B699B for secondary text, #A7592B as an accent and #1D3763 for hover and pressed states. For a palette, the analogous pair #2F95A3 and #3D2FA3 stays calm, while #A3772F is the loudest partner.

What is #2f5ba3 in CMYK for printing?

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

Is #2f5ba3 warm or cool?

Cool — it scores 96 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #2F31A3; nudged cooler, #285691.

Work with #2f5ba3 in the Color Lab