CSS named color
RoyalBlue #4169E1
RoyalBlue is a blue with the hex code #4169E1, which converts to rgb(65, 105, 225). Open #4169E1 in the converter to tweak it.
RoyalBlue color values
| HEX | #4169E1 |
|---|---|
| HEX (shorthand) | — |
| RGB | rgb(65, 105, 225) |
| RGBA | rgba(65, 105, 225, 1) |
| 8-digit HEX | #4169E1FF |
| HSL | hsl(225, 73%, 57%) |
| HSV / HSB | 225°, 71%, 88% |
| CMYK | 71%, 53%, 0%, 12% |
| RGB 0–1 | 0.255, 0.412, 0.882 |
| Decimal | 4286945 |
| CSS keyword | royalblue |
How #4169E1 converts to RGB
Split the hex code into three pairs and read each pair as a base-16 number: 41 → 65, 69 → 105, E1 → 225. That gives rgb(65, 105, 225). The step-by-step guide explains the math.
Shades of RoyalBlue
Mixed toward black in 10% steps. Click a swatch to copy its hex.
Tints of RoyalBlue
Mixed toward white in 10% steps.
Color harmonies
Hue rotations of RoyalBlue on the HSL color wheel, keeping saturation and lightness fixed. The color harmony guide explains when each scheme works.
Complementary
Analogous
Split-complementary
Triadic
Tetradic (square)
Contrast and accessibility
| Text | Background | Ratio | WCAG 2.x |
|---|---|---|---|
| White | RoyalBlue | 4.84:1 | AA |
| Black | RoyalBlue | 4.33:1 | AA Large only |
Use white text on a royalblue background. Test any other pair in the contrast checker; thresholds are explained in the WCAG contrast guide.
Use RoyalBlue in CSS
.element {
color: royalblue; /* keyword */
background-color: #4169E1; /* hex */
border-color: rgb(65 105 225 / 50%); /* 50% transparent */
}
Need it semi-transparent? Append an alpha byte: #4169E180 is RoyalBlue at 50% opacity. See RGBA & transparency.
Similar named colors
FAQ
What is the HEX code for RoyalBlue?
The CSS named color royalblue is #4169E1 in hexadecimal. In CSS you can write color: royalblue; or color: #4169E1; — both produce the same pixel.
What is RoyalBlue in RGB?
RoyalBlue is rgb(65, 105, 225): red 65, green 105, blue 225 on the 0–255 scale. As normalized 0–1 floats that is (0.255, 0.412, 0.882).
Is white or black text more readable on RoyalBlue?
White text is more readable. White on #4169E1 has a contrast ratio of 4.84:1 (AA), black on #4169E1 has 4.33:1 (AA Large only). WCAG AA needs 4.5:1 for normal text.