Royal blue
Royal blue is a light, rich color from the blue family. Hex code #4169E1.
Color codes
- CSS name
royalblue - HEX
#4169E1 - RGB
rgb(65 105 225) - HSL
hsl(225 73% 57%) - HSB / HSV
hsb(225, 71%, 88%) - OKLCH
oklch(56% 0.188 266.4) - CMYK
cmyk(71%, 53%, 0%, 12%)
White text
4.84:1 · passes WCAG AA
Black text
4.33:1 · passes WCAG AA for large text only
Shades
Complementary
Analogous
Triadic
About this color
Royal blue in CSS and design
Royal blue is a light, rich color from the blue family. Royal blue is one of the extended color keywords, which CSS adopted from the X11 color names used on Unix workstations.
Use it in CSS by name or by any of its codes; these all give the same color:
color: royalblue;
color: #4169E1;
color: rgb(65 105 225);
color: hsl(225 73% 57%);For text on royal blue, white reads best. Check other combinations with the contrast checker, or browse all CSS color names.
More tools
Work with this color
- Color picker and converterPick a color and get HEX, RGB, HSL, HSB, CMYK and OKLCH, plus shades and harmonies.
- Contrast checkerCheck text and background colors against WCAG AA and AAA, and fix failing ones.
- CSS color namesAll 148 named colors with hex codes, shades, contrast and matching palettes.
- Palette generatorBuild a color palette from harmony rules, with shades and CSS variables.
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), in HSL hsl(225 73% 57%). For print, cmyk(71%, 53%, 0%, 12%) is a starting point, but CMYK depends on paper and ink, so check with your printer.
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.
Which colors go with royal blue?
Its complementary color is #916F0C, on the opposite side of the color wheel. For a calmer look, combine it with its analogous neighbors #1E7DAD and #8254D3. The palette generator builds more combinations.