Skip to content

#1f309c

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

RGB
31, 48, 156
HSL
232°, 67%, 37%
CMYK
80, 69, 0, 39
Luminance
0.0481

At a glance

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

Hex
#1f309c
Hue
232°
blue
Saturation
67%
vivid
Lightness
37%
dark
Brightness
61%
HSV value
Perceived
26%
weighted brightness
Luminance
0.0481
WCAG relative
Temperature
Cool
88/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
10.71:1
Closest name
Dark Slate Blue
ΔE2000 7.1
Where it sits
Hue232° of 360°
Saturation67%
Lightness37%
Temperature
Warm ← → Cool88% 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#1f309c
RGBrgb(31, 48, 156)
HSLhsl(232, 67%, 37%)
CMYKcmyk(80%, 69%, 0%, 39%)
LABlab(26.2 33.8 -60.2)
LCHlch(26.2 69.1 299.3)
OKLCHoklch(0.377 0.174 268.7)
Decimal2044060
Display P3color(display-p3 0.122 0.188 0.612)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#1f309c on white: 10.71:1
AA ✓ pass · AA-large · AAA
Aa
#1f309c on black: 1.96:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #00449F
deuteranopia · #00389A
tritanopia · #004E62

Color scale — 50 to 950

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

#F3F4FB
#E8EAF8
#CAD0F1
#A1ACEC
#7382E3
#4458DA
#293FCC
#1f309c
#1B2A88
#182263
#0F153E
Base = 700Lightest = 50 · #F3F4FBDarkest = 950 · #0F153E
:root {
  --brand-50: #F3F4FB;
  --brand-100: #E8EAF8;
  --brand-200: #CAD0F1;
  --brand-300: #A1ACEC;
  --brand-400: #7382E3;
  --brand-500: #4458DA;
  --brand-600: #293FCC;
  --brand-700: #1f309c;
  --brand-800: #1B2A88;
  --brand-900: #182263;
  --brand-950: #0F153E;
  --brand: #1f309c;
  --brand-ink: #ffffff;
}

Colors that work with #1f309c

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#F4F5FA
Tinted page background
Border#C0C6ED
Hairlines and dividers
Muted text#4B569B
Captions on the surface
Accent#A06D1B
Second voice, not a rival
Dark variant#15216A
Hover, pressed, headers
Light variant#EAECFB
Selected rows, tints
Dark surface#141624
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 #1f309c

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#9C8B1F
Analogous left#1F6F9C
Analogous right#4C1F9C
Split-complement 1#9C4C1F
Split-complement 2#6F9C1F
Triadic 1#9C1F30
Triadic 2#309C1F
Tetradic#9C1F6F

RGB percentages

Red12.2%
Green18.8%
Blue61.2%

CMYK percentages

Cyan80.1%
Magenta69.2%
Yellow0.0%
Key (black)38.8%

Color previews

#1f309c text on a black background

contrast 1.96:1

Card sample

#1f309c text on a white background

contrast 10.71:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(31, 48, 156, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(31, 48, 156, 0.45);
Border & gradient
Gradient panel
border: 3px solid #1f309c;
background: linear-gradient(135deg, #1f309c, #611F9C);

Monochromatic scale

Palettes built from #1f309c

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.

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

#1f309c, answered

What color is #1f309c?

#1f309c is a dark vivid blue, closest to Dark Slate Blue (ΔE2000 7.1). It sits at 232° on the hue wheel with 67% saturation and 37% lightness, which reads as cool.

What is the RGB value of #1f309c?

rgb(31, 48, 156) — 31 red, 48 green and 156 blue out of 255, or 12.2% / 18.8% / 61.2% by channel.

Is #1f309c a light or a dark color?

It is a dark color. Relative luminance is 0.0481 and perceived brightness is 26%, so white text on it reaches 10.71:1.

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

White. It scores 10.71:1 against #1f309c, versus 1.96:1 for black — AAA at any size.

What is the complementary color of #1f309c?

#9C8B1F sits directly opposite on the wheel. Softer options are the split-complements #9C4C1F and #6F9C1F, which give the same contrast with far less vibration.

What colors go well with #1f309c?

For interface work: #F4F5FA as the surface, #C0C6ED for borders, #4B569B for secondary text, #A06D1B as an accent and #15216A for hover and pressed states. For a palette, the analogous pair #1F6F9C and #4C1F9C stays calm, while #9C8B1F is the loudest partner.

What is #1f309c in CMYK for printing?

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

Is #1f309c warm or cool?

Cool — it scores 88 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #3C1F9C; nudged cooler, #1D499E.

Work with #1f309c in the Color Lab