Skip to content

#1f337d

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

RGB
31, 51, 125
HSL
227°, 60%, 31%
CMYK
75, 59, 0, 51
Luminance
0.0414

At a glance

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

Hex
#1f337d
Hue
227°
blue
Saturation
60%
vivid
Lightness
31%
dark
Brightness
49%
HSV value
Perceived
24%
weighted brightness
Luminance
0.0414
WCAG relative
Temperature
Cool
90/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
11.49:1
Closest name
Dark Slate Blue
ΔE2000 7
Where it sits
Hue227° of 360°
Saturation60%
Lightness31%
Temperature
Warm ← → Cool90% 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#1f337d
RGBrgb(31, 51, 125)
HSLhsl(227, 60%, 31%)
CMYKcmyk(75%, 59%, 0%, 51%)
LABlab(24.1 19.8 -44.3)
LCHlch(24.1 48.6 294.1)
OKLCHoklch(0.353 0.128 267.8)
Decimal2044797
Display P3color(display-p3 0.122 0.200 0.490)

Copy-ready code

/* CSS */
color: #1f337d;
background-color: #1f337d;
/* Tailwind (arbitrary) */
class="text-[#1f337d] bg-[#1f337d]"
/* SCSS */
$brand: #1f337d;
/* SwiftUI */
Color(red: 0.122, green: 0.200, blue: 0.490)
/* Android */
Color.parseColor("#1f337d")
/* Flutter */
Color(0xFF1F337D)
/* Python / OpenCV (BGR) */
(125, 51, 31)

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 #1f337d · 11.49:1
Use #ffffffAAA at every size.
Aa
White text · 11.49:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.83:1
AA fail · AA large fail · AAA fail
Reading the other direction: #1f337d as text scores 11.49:1 on white and 1.83:1 on black.

Accessibility — WCAG contrast

Aa
#1f337d on white: 11.49:1
AA ✓ pass · AA-large · AAA
Aa
#1f337d on black: 1.83:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #003E80
deuteranopia · #00357C
tritanopia · #004552

Color scale — 50 to 950

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

#F4F5FB
#E9ECF7
#CCD4EF
#A5B4E9
#788EDE
#4B68D2
#3150C4
#2843A4
#1f337d
#1B2A5F
#111A3B
Base = 800Lightest = 50 · #F4F5FBDarkest = 950 · #111A3B
:root {
  --brand-50: #F4F5FB;
  --brand-100: #E9ECF7;
  --brand-200: #CCD4EF;
  --brand-300: #A5B4E9;
  --brand-400: #788EDE;
  --brand-500: #4B68D2;
  --brand-600: #3150C4;
  --brand-700: #2843A4;
  --brand-800: #1f337d;
  --brand-900: #1B2A5F;
  --brand-950: #111A3B;
  --brand: #1f337d;
  --brand-ink: #ffffff;
}

Colors that work with #1f337d

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#C0C9ED
Hairlines and dividers
Muted text#4B5C9B
Captions on the surface
Accent#80521C
Second voice, not a rival
Dark variant#192A66
Hover, pressed, headers
Light variant#EBEEFA
Selected rows, tints
Dark surface#141724
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 #1f337d

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#7D691F
Analogous left#1F627D
Analogous right#3A1F7D
Split-complement 1#7D3A1F
Split-complement 2#627D1F
Triadic 1#7D1F33
Triadic 2#337D1F
Tetradic#7D1F62

RGB percentages

Red12.2%
Green20.0%
Blue49.0%

CMYK percentages

Cyan75.2%
Magenta59.2%
Yellow0.0%
Key (black)51.0%

Color previews

#1f337d text on a black background

contrast 1.83:1

Card sample

#1f337d text on a white background

contrast 11.49:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #1f337d;
Background color
Panel with #1f337d background
background-color: #1f337d;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(31, 51, 125, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(31, 51, 125, 0.45);
Border & gradient
Gradient panel
border: 3px solid #1f337d;
background: linear-gradient(135deg, #1f337d, #4A1F7D);

Monochromatic scale

Palettes built from #1f337d

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.

#1f337d 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.

#1f337d, answered

What color is #1f337d?

#1f337d is a dark vivid blue, closest to Dark Slate Blue (ΔE2000 7). It sits at 227° on the hue wheel with 60% saturation and 31% lightness, which reads as cool.

What is the RGB value of #1f337d?

rgb(31, 51, 125) — 31 red, 51 green and 125 blue out of 255, or 12.2% / 20% / 49% by channel.

Is #1f337d a light or a dark color?

It is a dark color. Relative luminance is 0.0414 and perceived brightness is 24%, so white text on it reaches 11.49:1.

Should I use black or white text on #1f337d?

White. It scores 11.49:1 against #1f337d, versus 1.83:1 for black — AAA at any size.

What is the complementary color of #1f337d?

#7D691F sits directly opposite on the wheel. Softer options are the split-complements #7D3A1F and #627D1F, which give the same contrast with far less vibration.

What colors go well with #1f337d?

For interface work: #F4F6FA as the surface, #C0C9ED for borders, #4B5C9B for secondary text, #80521C as an accent and #192A66 for hover and pressed states. For a palette, the analogous pair #1F627D and #3A1F7D stays calm, while #7D691F is the loudest partner.

What is #1f337d in CMYK for printing?

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

Is #1f337d warm or cool?

Cool — it scores 90 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #2D1F7D; nudged cooler, #1D437F.

Work with #1f337d in the Color Lab