100% free no uploads no sign-up

royal blue color code

The hex code for royal blue is #4169E1, which is rgb(65, 105, 225) in RGB and cmyk(71%, 53%, 0%, 12%) in CMYK. It's a medium, rich blue. It is a built-in CSS colour, so you can also write it as “royalblue”.

#4169E1royal blue
White text: 4.84:1 ✓ AABlack text: 4.33:1 large text onlyNearest name: royal blue

Move the sliders to find a lighter, darker or softer royal blue; the codes update as you go.

Royal Blue colour codes

HEX#4169E1
RGBrgb(65, 105, 225)
HSLhsl(225, 73%, 57%)
HSV / HSBhsv(225, 71%, 88%)
CMYKcmyk(71%, 53%, 0%, 12%)
Decimal4286945
CSS keywordroyalblue

About royal blue

Royal Blue sits at a hue of 225° on the colour wheel, with 73% saturation and 57% lightness. That makes it a cool colour: cool colours feel calm and steady and appear to recede, so they work well for large areas.

For text, white reads better on royal blue. Royal Blue as text on a white background has a contrast ratio of 4.84:1, which passes the WCAG AA rule for body text (4.5:1). On black it is 4.33:1, which fails AA for body text.

Tints and shades of royal blue

Tints mix royal blue with white and shades mix it with black, in 10% steps. They're the easiest way to get lighter backgrounds and darker hover or text colours that still match.

#ECF0FC#D9E1F9#C6D2F6#B3C3F3#A0B4F0#8DA5ED#7A96EA#6787E7#5478E4
royal blue #4169E1
#3B5FCB#3454B4#2E4A9E#273F87#213571#1A2A5A#142044#0D152D#070B17

Colours that go with royal blue

Complementary — opposite on the colour wheel: maximum contrast

#4169E1#E1B941

Analogous — neighbours 30° either side: calm and natural

#41B9E1#4169E1#6941E1

Triadic — three hues 120° apart: lively but balanced

#4169E1#E14169#69E141

Split complementary — the two neighbours of the complement: contrast with less tension

#4169E1#E16941#B9E141

Tetradic — four hues 90° apart: rich, use one as the main colour

#4169E1#E141B9#E1B941#41E169

Royal Blue text contrast

CombinationRatioAA normal (4.5:1)AA large (3:1)AAA (7:1)
royal blue on white4.84:1passpassfail
royal blue on black4.33:1failpassfail

Check royal blue against any other colour in the contrast checker.

How royal blue looks with colour blindness

Simulated with the Machado et al. (2009) model for the complete loss of one type of cone cell. Colour vision deficiency affects roughly 1 in 12 men and 1 in 200 women, most often as red-green colour blindness.

normal #4169E1protanopia #087BE5deuteranopia #006ADFtritanopia #00869B

Use royal blue in code

.royal-blue {
  color: royalblue;
  background-color: #4169e1;
  border-color: rgb(65, 105, 225);
}

Frequently asked questions

What is the hex code for royal blue?

Royal Blue is #4169E1 (lowercase #4169e1). It's the official value of the CSS keyword “royalblue”.

What is royal blue in RGB, HSL and CMYK?

RGB: rgb(65, 105, 225). HSL: hsl(225, 73%, 57%). CMYK: cmyk(71%, 53%, 0%, 12%). CMYK is a simple conversion for reference; for professional printing, ask your printer for a matching ink or Pantone swatch.

What colours go with royal blue?

Its complementary colour is #E1B941 (close to goldenrod), which gives the strongest contrast. For a calmer look, use the analogous colours #41B9E1 and #6941E1, or the triadic pair #E14169 and #69E141. Tints and shades of royal blue itself always work together.

Is royal blue a warm or cool colour?

Royal Blue has a hue of 225°, which makes it cool.

Should I use black or white text on royal blue?

White. Black text on royal blue has a contrast ratio of 4.33:1 and white text has 4.84:1. WCAG asks for at least 4.5:1 for normal text and 3:1 for large text.

How do I use royal blue in CSS?

Write color: royalblue; or color: #4169e1; — both give the same colour. Named colours work in every browser.

Colours similar to royal blue