Royal blue
Royal blue is a light, rich shade of blue. Hex code #4169E1.
Royal blue color codes
- CSS name
royalblue - HEX
#4169E1 - RGB
rgb(65, 105, 225) - HSL
hsl(225, 73%, 57%) - OKLCH
oklch(56% 0.188 266.4)
HSB and CMYK values
- HSB / HSV
hsb(225, 71%, 88%) - CMYK
C71 M53 Y0 K12
White text
4.84:1 · passes WCAG AA
Black text
4.33:1 · passes WCAG AA for large text only
Shades of royal blue
A darker shade of royal blue is #203FB4 (600), and a lighter one is #7197FB (300).
Colors that go with royal blue
Complementary
Analogous
Triadic
The complementary color of royal blue is #E1B941.
Click a color to copy its hex code.
Colors similar to royal blue
- Slate blue#6A5ACD
Slightly darker, more purple
- Medium slate blue#7B68EE
Slightly lighter, more purple
- Dodger blue#1E90FF
Lighter, more cyan
- Steel blue#4682B4
Slightly lighter, more cyan, more muted
- Medium purple#9370DB
Lighter, more purple, more muted
- Cornflower blue#6495ED
Lighter, more muted
Each compared with royal blue.
About this color
Royal blue in CSS and design
Royal blue is one of the extended color keywords, which mostly go back to the X11 color names of Unix systems. These four lines all give the same royal blue:
color: royalblue;
color: #4169E1;
color: rgb(65, 105, 225);
color: hsl(225, 73%, 57%);What to know about royal blue
Merriam-Webster defines royal blue as a vivid purplish blue and dates the term to 1789. CSS royal blue (#4169E1) is a medium blue with a contrast of 4.84:1 against white, enough for WCAG AA both as text on white and behind white text, which makes it practical for links and buttons.
Frequently asked questions
What is the hex code for royal blue?
#4169E1. In CSS you can also use the keyword royalblue, which works in every browser.
What is royal blue in RGB and HSL?
In RGB it is rgb(65, 105, 225) and in HSL hsl(225, 73%, 57%). In CMYK it is about C71 M53 Y0 K12, though printed colors vary with paper and ink.
Should I use black or white text on royal blue?
White text works better: it has a contrast ratio of 4.84:1 and passes WCAG AA. Black text reaches 4.33:1.
What is the complementary color of royal blue?
#E1B941. It sits opposite royal blue on the color wheel: the hue turned 180 degrees, with the same saturation and lightness.
Which colors go with royal blue?
For strong contrast, pair it with its complementary color #E1B941. For a calmer look, combine it with its analogous neighbors #41B9E1 and #6941E1. The palette generator builds more combinations.