Skip to content

#1f3da2

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

RGB
31, 61, 162
HSL
226°, 68%, 38%
CMYK
81, 62, 0, 37
Luminance
0.0624

At a glance

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

Hex
#1f3da2
Hue
226°
blue
Saturation
68%
vivid
Lightness
38%
dark
Brightness
64%
HSV value
Perceived
29%
weighted brightness
Luminance
0.0624
WCAG relative
Temperature
Cool
91/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
9.34:1
Closest name
Dark Slate Blue
ΔE2000 7.2
Where it sits
Hue226° of 360°
Saturation68%
Lightness38%
Temperature
Warm ← → Cool91% 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#1f3da2
RGBrgb(31, 61, 162)
HSLhsl(226, 68%, 38%)
CMYKcmyk(81%, 62%, 0%, 37%)
LABlab(30.0 27.5 -57.6)
LCHlch(30.0 63.8 295.5)
OKLCHoklch(0.407 0.167 266.1)
Decimal2047394
Display P3color(display-p3 0.122 0.239 0.635)

Copy-ready code

/* CSS */
color: #1f3da2;
background-color: #1f3da2;
/* Tailwind (arbitrary) */
class="text-[#1f3da2] bg-[#1f3da2]"
/* SCSS */
$brand: #1f3da2;
/* SwiftUI */
Color(red: 0.122, green: 0.239, blue: 0.635)
/* Android */
Color.parseColor("#1f3da2")
/* Flutter */
Color(0xFF1F3DA2)
/* Python / OpenCV (BGR) */
(162, 61, 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 #1f3da2 · 9.34:1
Use #ffffffAAA at every size.
Aa
White text · 9.34:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 2.25:1
AA fail · AA large fail · AAA fail
Reading the other direction: #1f3da2 as text scores 9.34:1 on white and 2.25:1 on black.

Accessibility — WCAG contrast

Aa
#1f3da2 on white: 9.34:1
AA ✓ pass · AA-large · AAA
Aa
#1f3da2 on black: 2.25:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #004DA5
deuteranopia · #0041A0
tritanopia · #005769

Color scale — 50 to 950

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

#F3F5FB
#E8EBF8
#CAD3F2
#A1B2ED
#728CE4
#4365DB
#274DCE
#1f3da2
#1A3389
#172863
#0E193E
Base = 700Lightest = 50 · #F3F5FBDarkest = 950 · #0E193E
:root {
  --brand-50: #F3F5FB;
  --brand-100: #E8EBF8;
  --brand-200: #CAD3F2;
  --brand-300: #A1B2ED;
  --brand-400: #728CE4;
  --brand-500: #4365DB;
  --brand-600: #274DCE;
  --brand-700: #1f3da2;
  --brand-800: #1A3389;
  --brand-900: #172863;
  --brand-950: #0E193E;
  --brand: #1f3da2;
  --brand-ink: #ffffff;
}

Colors that work with #1f3da2

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#C0CAED
Hairlines and dividers
Muted text#4B5D9B
Captions on the surface
Accent#A6631B
Second voice, not a rival
Dark variant#14286B
Hover, pressed, headers
Light variant#EAEEFB
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 #1f3da2

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#A2841F
Analogous left#1F7EA2
Analogous right#431FA2
Split-complement 1#A2431F
Split-complement 2#7EA21F
Triadic 1#A21F3D
Triadic 2#3DA21F
Tetradic#A21F7E

RGB percentages

Red12.2%
Green23.9%
Blue63.5%

CMYK percentages

Cyan80.9%
Magenta62.3%
Yellow0.0%
Key (black)36.5%

Color previews

#1f3da2 text on a black background

contrast 2.25:1

Card sample

#1f3da2 text on a white background

contrast 9.34:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(31, 61, 162, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(31, 61, 162, 0.45);
Border & gradient
Gradient panel
border: 3px solid #1f3da2;
background: linear-gradient(135deg, #1f3da2, #581FA2);

Monochromatic scale

Palettes built from #1f3da2

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.

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

#1f3da2, answered

What color is #1f3da2?

#1f3da2 is a dark vivid blue, closest to Dark Slate Blue (ΔE2000 7.2). It sits at 226° on the hue wheel with 68% saturation and 38% lightness, which reads as cool.

What is the RGB value of #1f3da2?

rgb(31, 61, 162) — 31 red, 61 green and 162 blue out of 255, or 12.2% / 23.9% / 63.5% by channel.

Is #1f3da2 a light or a dark color?

It is a dark color. Relative luminance is 0.0624 and perceived brightness is 29%, so white text on it reaches 9.34:1.

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

White. It scores 9.34:1 against #1f3da2, versus 2.25:1 for black — AAA at any size.

What is the complementary color of #1f3da2?

#A2841F sits directly opposite on the wheel. Softer options are the split-complements #A2431F and #7EA21F, which give the same contrast with far less vibration.

What colors go well with #1f3da2?

For interface work: #F4F6FA as the surface, #C0CAED for borders, #4B5D9B for secondary text, #A6631B as an accent and #14286B for hover and pressed states. For a palette, the analogous pair #1F7EA2 and #431FA2 stays calm, while #A2841F is the loudest partner.

What is #1f3da2 in CMYK for printing?

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

Is #1f3da2 warm or cool?

Cool — it scores 91 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #311FA2; nudged cooler, #1D4FA4.

Work with #1f3da2 in the Color Lab