CSS color names · Blues

Royal Blue color: hex #4169e1, RGB and HSL

Royal Blue is the CSS keyword royalblue, hex #4169e1, rgb(65, 105, 225), hsl(225, 73%, 57%). It is a medium, vivid blue in the blues family. Below: the colors that go with it, its tints and shades, how it reads as text, and a complete interface palette built from it.

CSS name
royalblue
Hex
#4169e1
RGB
rgb(65, 105, 225)
HSL
hsl(225, 73%, 57%)
On white
4.85:1 — passes AA for body text
On black
4.33:1 — large text and UI only (3:1)
.example {
  color: royalblue;          /* keyword */
  color: #4169e1;          /* hex */
  color: rgb(65, 105, 225); /* rgb */
  color: hsl(225, 73%, 57%); /* hsl */
}

What colors go with royal blue

Each match keeps royal blue's saturation and lightness and rotates only the hue, so the relationship is the wheel's and nothing else. Any of these can be an accent beside royal blue as the primary; the harmony guides explain which rule suits which interface.

Complementary

The opposite hue, 180° away — the strongest contrast, best kept to one accent per screen.

#e1b941

Split-complementary

The two neighbors of the complement, at 150° and 210° — most of the contrast with less tension, and two accents instead of one.

#e16941
#b9e141

Triadic

Two hues at 120° and 240° — three evenly spaced signals, the scheme charts and category colors want.

#e14169
#69e141

Analogous

The neighbors at −30° and +30° — calm and cohesive, with emphasis coming from weight and size rather than hue.

#41b9e1
#6941e1

Tints and shades of royal blue

Tints add lightness toward white; shades remove it toward black. The hue and saturation stay fixed, so every step still reads as royal blue — these are the hover, pressed, disabled and surface variants a single brand color needs.

Tints (lighter)

#6182e6
#809beb
#a0b4f0
#c0cdf5
#dfe6fa

Shades (darker)

#214dd1
#1a3ea7
#142e7d
#0d1f53
#070f2a

A UI color palette built from royal blue

The eight semantic roles an interface actually uses, derived from royal blue as the primary with the split-complementary rule: secondary and accent rotate around the wheel, and the five neutrals take the hue at lightness steps tuned for light and dark mode. This is the same derivation the palette generator runs — open it there to change the rule, drag the anchors, or export the set as CSS variables.

Light mode
primary
#4169e1
secondary
#e16941
accent
#b9e141
background
#fcfcfd
surface
#f3f4f7
text
#111522
muted
#56648f
border
#dfe2ec
Dark mode
primary
#4169e1
secondary
#e16941
accent
#b9e141
background
#0e111b
surface
#151a28
text
#f3f4f6
muted
#949db8
border
#273049

Using royal blue in an interface

Blue is the default interface color for a reason: it sits comfortably behind content, it has a wide usable lightness range for hover and pressed states, and its complement (orange) leaves red and green free for status. Most of the good primaries in this set are here. Whichever role royal blue takes, define it once as a token rather than repeating the keyword: the semantic palette guide covers the eight roles, and the guides to complementary, triadic and the other color schemes explain how to weight the matches above.

What is the hex code for Royal Blue?
Royal Blue is #4169e1. In CSS the keyword royalblue, the hex #4169e1, rgb(65, 105, 225) and hsl(225, 73%, 57%) all paint the same color.
What colors go with Royal Blue?
Its complement is #e1b941, the split-complementary pair is #e16941 and #b9e141, the triadic partners are #e14169 and #69e141, and the analogous neighbors are #41b9e1 and #6941e1. In an interface, use Royal Blue for most colored elements and one of these for a single accent, at roughly an 80/20 split.
What is the opposite of Royal Blue on the color wheel?
The opposite (complementary) color is #e1b941, the same saturation and lightness rotated 180° around the HSL wheel. Complementary pairs give the strongest contrast, which is why the complement should be used sparingly rather than at equal weight.
Can I use Royal Blue for text?
Royal Blue as text on white has a contrast ratio of 4.85:1, which passes WCAG AA for body text (4.5:1). On black it is 4.33:1, which fails for body text. It works as a text color on light surfaces.

Similar named colors

More blues

We'd like to use Google cookies to understand how Nodlume is used and to measure our advertising. Nothing loads until you choose, and declining does not affect anything in the app.