Skip to content

#1f4df5

a balanced, electric blue · cool · closest name: Royal Blue

RGB
31, 77, 245
HSL
227°, 92%, 54%
CMYK
87, 69, 0, 4
Luminance
0.1219

At a glance

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

Hex
#1f4df5
Hue
227°
blue
Saturation
92%
electric
Lightness
54%
balanced
Brightness
96%
HSV value
Perceived
40%
weighted brightness
Luminance
0.1219
WCAG relative
Temperature
Cool
90/100 cool
Color family
Blue
Tone
Electric
Best ink
White
6.11:1
Closest name
Royal Blue
ΔE2000 8.7
Where it sits
Hue227° of 360°
Saturation92%
Lightness54%
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#1f4df5
RGBrgb(31, 77, 245)
HSLhsl(227, 92%, 54%)
CMYKcmyk(87%, 69%, 0%, 4%)
LABlab(41.5 48.0 -86.9)
LCHlch(41.5 99.3 298.9)
OKLCHoklch(0.515 0.253 265.3)
Decimal2051573
Display P3color(display-p3 0.122 0.302 0.961)

Copy-ready code

/* CSS */
color: #1f4df5;
background-color: #1f4df5;
/* Tailwind (arbitrary) */
class="text-[#1f4df5] bg-[#1f4df5]"
/* SCSS */
$brand: #1f4df5;
/* SwiftUI */
Color(red: 0.122, green: 0.302, blue: 0.961)
/* Android */
Color.parseColor("#1f4df5")
/* Flutter */
Color(0xFF1F4DF5)
/* Python / OpenCV (BGR) */
(245, 77, 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 #1f4df5 · 6.11:1
Use #ffffffAA at every size, AAA for large text only.
Aa
White text · 6.11:1 · recommended
AA pass · AA large pass · AAA fail
Aa
Black text · 3.44:1
AA fail · AA large pass · AAA fail
Reading the other direction: #1f4df5 as text scores 6.11:1 on white and 3.44:1 on black.

Accessibility — WCAG contrast

Aa
#1f4df5 on white: 6.11:1
AA ✓ pass · AA-large · AAA
Aa
#1f4df5 on black: 3.44:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #006CFA
deuteranopia · #0058F2
tritanopia · #007C9B

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #1f4df5 is pinned to step 500; the rest hold its hue and let saturation ease off at the extremes so the pale end never turns neon.

#F2F4FD
#E4E9FB
#C3CEF9
#94AAFA
#5E7FF8
#1f4df5
#0A3BEA
#0931C3
#07279C
#0A2071
#061446
Base = 500Lightest = 50 · #F2F4FDDarkest = 950 · #061446
:root {
  --brand-50: #F2F4FD;
  --brand-100: #E4E9FB;
  --brand-200: #C3CEF9;
  --brand-300: #94AAFA;
  --brand-400: #5E7FF8;
  --brand-500: #1f4df5;
  --brand-600: #0A3BEA;
  --brand-700: #0931C3;
  --brand-800: #07279C;
  --brand-900: #0A2071;
  --brand-950: #061446;
  --brand: #1f4df5;
  --brand-ink: #ffffff;
}

Colors that work with #1f4df5

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#C86D04
Second voice, not a rival
Dark variant#051F7A
Hover, pressed, headers
Light variant#E7ECFE
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 #1f4df5

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
  • Brand accents, badges and data highlights
Use with care
  • Full-page backgrounds — tiring over long sessions
  • 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#F5C71F
Analogous left#1FB8F5
Analogous right#5C1FF5
Split-complement 1#F55C1F
Split-complement 2#B8F51F
Triadic 1#F51F4D
Triadic 2#4DF51F
Tetradic#F51FB8

RGB percentages

Red12.2%
Green30.2%
Blue96.1%

CMYK percentages

Cyan87.3%
Magenta68.6%
Yellow0.0%
Key (black)3.9%

Color previews

#1f4df5 text on a black background

contrast 3.44:1

Card sample

#1f4df5 text on a white background

contrast 6.11:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(31, 77, 245, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(31, 77, 245, 0.45);
Border & gradient
Gradient panel
border: 3px solid #1f4df5;
background: linear-gradient(135deg, #1f4df5, #801FF5);

Monochromatic scale

Palettes built from #1f4df5

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.

#1f4df5 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

Sits outside most CMYK gamuts — expect a duller press result, or specify a spot ink.

#1f4df5, answered

What color is #1f4df5?

#1f4df5 is a balanced electric blue, closest to Royal Blue (ΔE2000 8.7). It sits at 227° on the hue wheel with 92% saturation and 54% lightness, which reads as cool.

What is the RGB value of #1f4df5?

rgb(31, 77, 245) — 31 red, 77 green and 245 blue out of 255, or 12.2% / 30.2% / 96.1% by channel.

Is #1f4df5 a light or a dark color?

It is a dark color. Relative luminance is 0.1219 and perceived brightness is 40%, so white text on it reaches 6.11:1.

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

White. It scores 6.11:1 against #1f4df5, versus 3.44:1 for black — AA at any size.

What is the complementary color of #1f4df5?

#F5C71F sits directly opposite on the wheel. Softer options are the split-complements #F55C1F and #B8F51F, which give the same contrast with far less vibration.

What colors go well with #1f4df5?

For interface work: #F4F6FA as the surface, #C0C9ED for borders, #4B5C9B for secondary text, #C86D04 as an accent and #051F7A for hover and pressed states. For a palette, the analogous pair #1FB8F5 and #5C1FF5 stays calm, while #F5C71F is the loudest partner.

What is #1f4df5 in CMYK for printing?

cmyk(87%, 69%, 0%, 4%). This is a screen-to-ink approximation — a color this saturated sits outside most CMYK gamuts and will print duller than it looks here.

Is #1f4df5 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 #3F1FF5; nudged cooler, #1D66F7.

Work with #1f4df5 in the Color Lab