Royal Blue Color Code: Hex #4169E1
The hex code for Royal Blue is #4169E1 (the CSS keyword royalblue). Royal Blue RGB code: rgb(65, 105, 225). The xkcd color survey gives #0504AA instead, which looks clearly different; both codes are below with their source.
#4169E1Top: the code browsers use#0504AABelow: compare edge to edgeRoyal Blue color codes: each Royal Blue hex code in every format
Sources
Properties
- Hex codes
- 2 different ones in 3 color lists; they look clearly different
- Family
- blue
- Contrast
- 4.85:1 with white, 4.33:1 with black
- CSS keyword
- royalblue
- Character
- mid-tone, vivid
- Readable text on it
- white (AA)
By tradition the shade was created by a consortium of mills in Rode, Somerset, which won a competition to make a robe for Queen Charlotte, wife of George III. The traditional royal blue is much darker than the web keyword, which follows the brighter shade people came to associate with the name by the 1950s.
A mid-tone, vivid blue with a cool cast. In code, royalblue gives exactly this web value. If you mean the color as people usually picture the name, the survey value #0504AA is closer: it is darker and more vivid.
White text reads best on it; black text works only for large headings. Its exact opposite on the color wheel cannot be shown on screens, so the complementary palette uses the closest displayable version. Even pale tints keep its hue, which makes it easy to use for soft backgrounds. Next to Electric Blue, its closest named neighbour, it looks lighter, more muted and warmer; beside Steel Blue it looks darker, more vivid and cooler.
Colors that go with Royal Blue
Complementary: the opposite of Royal Blue
#4169E1White text 4.85:1#926F00White text 4.67:1#92AFF3Black text 9.65:1#584200White text 9.57:1
Analogous
#007EB2Black text 4.63:1#4169E1White text 4.85:1#8254D3White text 5.05:1#AFC5F7Black text 12.15:1
Triadic
#4169E1White text 4.85:1#CB3532White text 5.13:1#008D2EBlack text 4.85:1#CCDBFBBlack text 15.09:1
Monochrome
#0B183EWhite text 17.29:1#253E8BWhite text 9.81:1#4169E1White text 4.85:1#7698EEBlack text 7.50:1#AFC5F7Black text 12.15:1
With neutrals
#4169E1White text 4.85:1#CCDBFBBlack text 15.09:1#03071CWhite text 19.98:1#6D7C9FBlack text 5.03:1
Preview
Heading on Royal Blue
Body text on this color, 4.85:1.
ButtonHeading in Royal Blue
Text in this color on white, 4.85:1.
ButtonTints and shades
#CCDBFB#AFC5F7#92AFF3#7698EE#5B81E8#4169E1#3253B5#253E8B#172A63#0B183E#03071C
WhiteRoyal BlueBlack
Similar named colors
Where the name comes from
- Source: Wikipedia, “Royal blue” (checked 1 Nov 2026)
- Source: Wikipedia, “Rode, Somerset” (checked 1 Nov 2026)
- Listed in CSS Color 4, xkcd color survey, meodai color-name-list. About these lists.
Try it: