Skip to content

Royal Blue

Hex #4169E1, rgb(65 105 225). A blue CSS named color.

Open in palette generator

Royal Blue color codes

Click any value to copy it.

HEX
RGB
HSL
HSV
HWB
CMYK
OKLCH
OKLab
Lab
LCH
CSS keyword

About Royal Blue

Royal Blue is a medium saturated blue with the hex code #4169E1. In RGB it is made of 65 red, 105 green and 225 blue; in HSL its hue is 225°, with 73% saturation and 57% lightness. Its perceptual lightness (OKLCH L) is 56.0%.

It is a CSS named color, so you can write "royalblue" anywhere CSS accepts a color. Against white it has a contrast ratio of 4.85:1 and against black 4.33:1, so white text reads better on it and passes WCAG AA for normal text.

Tints, shades and tones

Royal Blue mixed step by step with white, black and middle gray (#808080).

Tints (with white)

Shades (with black)

Tones (with gray)

Royal Blue 50-950 scale

A Tailwind-style scale built in OKLCH; the original color sits on the step with the closest lightness.

Colors that go with Royal Blue

Color harmonies rotate the hue in OKLCH and keep the lightness and chroma. Each color links to its closest named color.

Complementary

Analogous

Triadic

Split complementary

Tetradic

Contrast and readability

WCAG 2 contrast of Royal Blue with white and black. The readable text color on Royal Blue is white.

Royal Blue textSmall text on white

On white4.85:1

  • AA pass
  • AA Large pass
  • AAA fail
  • UI 3:1 pass

APCA Lc 73

Royal Blue textSmall text on black

On black4.33:1

  • AA fail
  • AA Large pass
  • AAA fail
  • UI 3:1 pass

APCA Lc -29

White text on Royal Blue (#FFFFFF)

Test any pair in the contrast checker.

Color blindness preview

How Royal Blue appears with each type of color vision deficiency (simulated with the Machado model).

  • Protanopia#0879E5
  • Deuteranopia#006ADF
  • Tritanopia#00869B
  • Protanomaly#1E74E3
  • Deuteranomaly#006BE0
  • Tritanomaly#1676C5
  • Achromatopsia#717171

Colors similar to Royal Blue

The closest named colors by perceptual difference (OKLab).

Use Royal Blue in CSS and Tailwind

CSS
.royal-blue {
  color: royalblue; /* #4169E1 */
  background-color: rgb(65 105 225);
  border-color: oklch(56% 0.188 266.4);
}
Tailwind CSS
/* Tailwind CSS v4: bg-royal-blue-500, text-royal-blue-700... */
@theme {
  --color-royal-blue-50: #F8FAFF;
  --color-royal-blue-100: #E6EEFF;
  --color-royal-blue-200: #CCDBFF;
  --color-royal-blue-300: #A4BFFF;
  --color-royal-blue-400: #7098FF;
  --color-royal-blue-500: #517DFB;
  --color-royal-blue-600: #4169E1;
  --color-royal-blue-700: #3253B9;
  --color-royal-blue-800: #284393;
  --color-royal-blue-900: #203676;
  --color-royal-blue-950: #061138;
}

<!-- or the exact color, no config -->
<div class="bg-[#4169E1] text-[#FFFFFF]">…</div>