Royal Blue color (#4169E1)
Royal Blue is one of the 148 CSS named colors. Use the keyword royalblue
anywhere CSS accepts a color, or its hex code #4169E1, which is rgb(65, 105, 225) in RGB.
It is a medium, vivid cool color with a hue angle of 225° on the HSL color wheel and a perceived lightness of 56% in OKLCH. On a royal blue background, white text gives the higher contrast at 4.84:1, which passes WCAG AA for normal text.
Royal Blue color codes
| CSS name | royalblue |
|
|---|---|---|
| HEX | #4169E1 |
|
| HEX (8-digit) | #4169E1FF |
|
| RGB | rgb(65, 105, 225) |
|
| HSL | hsl(225, 73%, 57%) |
|
| HSV / HSB | hsv(225, 71%, 88%) |
|
| OKLCH | oklch(56% 0.1882 266.4) |
|
| CMYK | cmyk(71.1%, 53.3%, 0%, 11.8%) |
Contrast with white and black
WCAG 2 contrast ratios and APCA lightness contrast (Lc) for royal blue used as text and as a background.
Tints and shades of royal blue
Tints mix royal blue with white; shades mix it with black, in 10% steps. Click a swatch to copy it, or build custom scales in the tint & shade generator.
Tints
Shades
Colors that go with royal blue
Harmonies calculated on the HSL color wheel. Explore more in the color scheme generator.
Complementary
Analogous
Triadic
Split-Complementary
Royal Blue with color blindness
Approximately how royal blue appears with each type of color vision deficiency. Test full designs with the color blindness simulator.
Using royal blue in CSS
.element {
color: royalblue;
background-color: #4169e1;
border-color: rgb(65 105 225 / 50%);
outline-color: oklch(56% 0.1882 266.4);
}Similar named colors
See all shades of blue or browse every CSS color name.