About royal blue
In CSS, royal blue is royalblue (#4169E1), a bright, medium blue.
Darker blues nearby are mediumblue (#0000CD) and darkblue (#00008B), and lighter ones are cornflowerblue (#6495ED) and dodgerblue (#1E90FF).
Shades and tints of royal blue
Royal blue lands on the 600 step. The steps follow a lightness curve modeled on Tailwind CSS's default palette; build your own in the Tailwind color generator. For royal blue mixed with white, black or gray in even steps, use the tint and shade generator.
Colors that go with royal blue
Partner hues are picked on the OKLCH color wheel.
Complementary: the opposite hue
Open in the palette generator · Compare the screen and painter's complements of royal blue
Analogous: neighboring hues 30° either side
Open in the palette generator · See analogous and monochromatic colors of royal blue on three wheels
Triadic: three hues 120° apart
Split complementary: the two hues beside the complement
Text on royal blue
| Text | Ratio | AA normal | AA large | AAA normal |
|---|---|---|---|---|
| White | 4.85:1 | Pass | Pass | Fail |
| Black | 4.33:1 | Fail | Pass | Fail |
The ratio is the same either way round, so royal blue text on a white background is also 4.85:1. Check other pairs in the color contrast checker.
Similar named colors
The CSS named colors closest to royal blue, by deltaE OK distance.
See all 148 on the color names page.
Closest Tailwind CSS colors
blue-600 v4: blue-600, #155DFC, deltaE OK 0.060
blue-600 v3: blue-600, #2563EB, deltaE OK 0.033
In Tailwind CSS v4 it is blue-600 (#155DFC), and in v3 blue-600 (#2563EB). For the exact color, use an arbitrary value such as bg-[#4169e1]. A deltaE OK of around 0.02 is roughly the smallest difference most people notice side by side. Browse every shade on the Tailwind CSS colors page.
Royal blue with color vision deficiency
An approximation of how royal blue may look with protanopia, deuteranopia and tritanopia (simulated with Machado, Oliveira and Fernandes, 2009), and with achromatopsia, shown as a gray of the same luminance.
Test a whole palette or image in the color blindness simulator.
Using royal blue in code
.example {
color: royalblue; /* named color */
background-color: #4169e1; /* hex */
border-color: rgb(65, 105, 225);
}
