Skip to content

#045ef1

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

RGB
4, 94, 241
HSL
217°, 97%, 48%
CMYK
98, 61, 0, 6
Luminance
0.1438

At a glance

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

Hex
#045ef1
Hue
217°
blue
Saturation
97%
electric
Lightness
48%
balanced
Brightness
95%
HSV value
Perceived
43%
weighted brightness
Luminance
0.1438
WCAG relative
Temperature
Cool
96/100 cool
Color family
Blue
Tone
Electric
Best ink
White
5.42:1
Closest name
Royal Blue
ΔE2000 4.2
Where it sits
Hue217° of 360°
Saturation97%
Lightness48%
Temperature
Warm ← → Cool96% 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#045ef1
RGBrgb(4, 94, 241)
HSLhsl(217, 97%, 48%)
CMYKcmyk(98%, 61%, 0%, 6%)
LABlab(44.8 35.1 -79.3)
LCHlch(44.8 86.7 293.9)
OKLCHoklch(0.537 0.233 261.3)
Decimal286449
Display P3color(display-p3 0.016 0.369 0.945)

Copy-ready code

/* CSS */
color: #045ef1;
background-color: #045ef1;
/* Tailwind (arbitrary) */
class="text-[#045ef1] bg-[#045ef1]"
/* SCSS */
$brand: #045ef1;
/* SwiftUI */
Color(red: 0.016, green: 0.369, blue: 0.945)
/* Android */
Color.parseColor("#045ef1")
/* Flutter */
Color(0xFF045EF1)
/* Python / OpenCV (BGR) */
(241, 94, 4)

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 #045ef1 · 5.42:1
Use #ffffffAA at every size, AAA for large text only.
Aa
White text · 5.42:1 · recommended
AA pass · AA large pass · AAA fail
Aa
Black text · 3.88:1
AA fail · AA large pass · AAA fail
Reading the other direction: #045ef1 as text scores 5.42:1 on white and 3.88:1 on black.

Accessibility — WCAG contrast

Aa
#045ef1 on white: 5.42:1
AA ✓ pass · AA-large · AAA
Aa
#045ef1 on black: 3.88:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0074F6
deuteranopia · #0060EE
tritanopia · #00859F

Color scale — 50 to 950

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

#F1F6FD
#E4EDFC
#C1D7FB
#91BAFD
#5997FC
#2275FB
#045ef1
#034EC9
#033FA1
#073074
#041E48
Base = 600Lightest = 50 · #F1F6FDDarkest = 950 · #041E48
:root {
  --brand-50: #F1F6FD;
  --brand-100: #E4EDFC;
  --brand-200: #C1D7FB;
  --brand-300: #91BAFD;
  --brand-400: #5997FC;
  --brand-500: #2275FB;
  --brand-600: #045ef1;
  --brand-700: #034EC9;
  --brand-800: #033FA1;
  --brand-900: #073074;
  --brand-950: #041E48;
  --brand: #045ef1;
  --brand-ink: #ffffff;
}

Colors that work with #045ef1

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#F4F7FA
Tinted page background
Border#C0D1ED
Hairlines and dividers
Muted text#4B699B
Captions on the surface
Accent#F55B00
Second voice, not a rival
Dark variant#02317D
Hover, pressed, headers
Light variant#E6EFFF
Selected rows, tints
Dark surface#141A24
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 #045ef1

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#F19704
Analogous left#04D4F1
Analogous right#2004F1
Split-complement 1#F12004
Split-complement 2#D4F104
Triadic 1#F1045E
Triadic 2#5EF104
Tetradic#F104D4

RGB percentages

Red1.6%
Green36.9%
Blue94.5%

CMYK percentages

Cyan98.3%
Magenta61.0%
Yellow0.0%
Key (black)5.5%

Color previews

#045ef1 text on a black background

contrast 3.88:1

Card sample

#045ef1 text on a white background

contrast 5.42:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #045ef1;
Background color
Panel with #045ef1 background
background-color: #045ef1;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(4, 94, 241, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(4, 94, 241, 0.45);
Border & gradient
Gradient panel
border: 3px solid #045ef1;
background: linear-gradient(135deg, #045ef1, #4804F1);

Monochromatic scale

Palettes built from #045ef1

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.

#045ef1 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.

#045ef1, answered

What color is #045ef1?

#045ef1 is a balanced electric blue, closest to Royal Blue (ΔE2000 4.2). It sits at 217° on the hue wheel with 97% saturation and 48% lightness, which reads as cool.

What is the RGB value of #045ef1?

rgb(4, 94, 241) — 4 red, 94 green and 241 blue out of 255, or 1.6% / 36.9% / 94.5% by channel.

Is #045ef1 a light or a dark color?

It is a dark color. Relative luminance is 0.1438 and perceived brightness is 43%, so white text on it reaches 5.42:1.

Should I use black or white text on #045ef1?

White. It scores 5.42:1 against #045ef1, versus 3.88:1 for black — AA at any size.

What is the complementary color of #045ef1?

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

What colors go well with #045ef1?

For interface work: #F4F7FA as the surface, #C0D1ED for borders, #4B699B for secondary text, #F55B00 as an accent and #02317D for hover and pressed states. For a palette, the analogous pair #04D4F1 and #2004F1 stays calm, while #F19704 is the loudest partner.

What is #045ef1 in CMYK for printing?

cmyk(98%, 61%, 0%, 6%). 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 #045ef1 warm or cool?

Cool — it scores 96 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #0407F1; nudged cooler, #015DDA.

Work with #045ef1 in the Color Lab