Skip to content

#2f509d

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

RGB
47, 80, 157
HSL
222°, 54%, 40%
CMYK
70, 49, 0, 38
Luminance
0.0878

At a glance

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

Hex
#2f509d
Hue
222°
blue
Saturation
54%
vivid
Lightness
40%
dark
Brightness
62%
HSV value
Perceived
33%
weighted brightness
Luminance
0.0878
WCAG relative
Temperature
Cool
93/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
7.62:1
Closest name
Dark Slate Blue
ΔE2000 9.6
Where it sits
Hue222° of 360°
Saturation54%
Lightness40%
Temperature
Warm ← → Cool93% 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#2f509d
RGBrgb(47, 80, 157)
HSLhsl(222, 54%, 40%)
CMYKcmyk(70%, 49%, 0%, 38%)
LABlab(35.5 14.8 -45.5)
LCHlch(35.5 47.9 288.0)
OKLCHoklch(0.450 0.131 264.3)
Decimal3100829
Display P3color(display-p3 0.184 0.314 0.616)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f509d on white: 7.62:1
AA ✓ pass · AA-large · AAA
Aa
#2f509d on black: 2.76:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #2659A0
deuteranopia · #094F9B
tritanopia · #00626F

Color scale — 50 to 950

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

#F4F6FB
#E9EDF6
#CED8EE
#A9BBE5
#7D99D8
#5277CB
#3860BC
#2f509d
#26407E
#1F315C
#131F39
Base = 700Lightest = 50 · #F4F6FBDarkest = 950 · #131F39
:root {
  --brand-50: #F4F6FB;
  --brand-100: #E9EDF6;
  --brand-200: #CED8EE;
  --brand-300: #A9BBE5;
  --brand-400: #7D99D8;
  --brand-500: #5277CB;
  --brand-600: #3860BC;
  --brand-700: #2f509d;
  --brand-800: #26407E;
  --brand-900: #1F315C;
  --brand-950: #131F39;
  --brand: #2f509d;
  --brand-ink: #ffffff;
}

Colors that work with #2f509d

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#C0CDEC
Hairlines and dividers
Muted text#4B639B
Captions on the surface
Accent#A1602B
Second voice, not a rival
Dark variant#1D3262
Hover, pressed, headers
Light variant#EBF0F9
Selected rows, tints
Dark surface#141924
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 #2f509d

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#9D7C2F
Analogous left#2F879D
Analogous right#452F9D
Split-complement 1#9D452F
Split-complement 2#879D2F
Triadic 1#9D2F50
Triadic 2#509D2F
Tetradic#9D2F87

RGB percentages

Red18.4%
Green31.4%
Blue61.6%

CMYK percentages

Cyan70.1%
Magenta49.0%
Yellow0.0%
Key (black)38.4%

Color previews

#2f509d text on a black background

contrast 2.76:1

Card sample

#2f509d text on a white background

contrast 7.62:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(47, 80, 157, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(47, 80, 157, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2f509d;
background: linear-gradient(135deg, #2f509d, #572F9D);

Monochromatic scale

Palettes built from #2f509d

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.

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

#2f509d, answered

What color is #2f509d?

#2f509d is a dark vivid blue, closest to Dark Slate Blue (ΔE2000 9.6). It sits at 222° on the hue wheel with 54% saturation and 40% lightness, which reads as cool.

What is the RGB value of #2f509d?

rgb(47, 80, 157) — 47 red, 80 green and 157 blue out of 255, or 18.4% / 31.4% / 61.6% by channel.

Is #2f509d a light or a dark color?

It is a dark color. Relative luminance is 0.0878 and perceived brightness is 33%, so white text on it reaches 7.62:1.

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

White. It scores 7.62:1 against #2f509d, versus 2.76:1 for black — AAA at any size.

What is the complementary color of #2f509d?

#9D7C2F sits directly opposite on the wheel. Softer options are the split-complements #9D452F and #879D2F, which give the same contrast with far less vibration.

What colors go well with #2f509d?

For interface work: #F4F6FA as the surface, #C0CDEC for borders, #4B639B for secondary text, #A1602B as an accent and #1D3262 for hover and pressed states. For a palette, the analogous pair #2F879D and #452F9D stays calm, while #9D7C2F is the loudest partner.

What is #2f509d in CMYK for printing?

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

Is #2f509d warm or cool?

Cool — it scores 93 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #362F9D; nudged cooler, #2D5C9F.

Work with #2f509d in the Color Lab