Royal blue to RGB — Color Code

#0504aa
Format Value
HEX #0504aa
RGB rgb(5, 4, 170)
HSL hsl(240.4, 95.4%, 34.1%)
CMYK cmyk(97.1%, 97.6%, 0%, 33.3%)
HSV hsv(240.4, 97.6%, 66.7%)

royal blue color harmonies

Tints & shades of royal blue

Tints (lighter)

#1c1bb2 #3232b9 #4948c1 #605fc9 #7776d1 #8d8dd8 #a4a4e0 #bbbbe8 #d2d1f0 #e8e8f7

Shades (darker)

#05049b #04038b #04037c #03036c #03025d #02024d #02013e #01012e #01011f #00000f

Contrast & accessibility

The quick brown fox

On white · 13.09:1 · AAA

The quick brown fox

On black · 1.6:1 · Fail

Recommended text color: #ffffff

Use royal blue in code

CSS color: #0504aa;
SCSS $color: #0504aa;
Tailwind bg-[#0504aa]
Swift UIColor(red: 0.020, green: 0.016, blue: 0.667, alpha: 1)
Android Color.parseColor("#0504aa")
Flutter Color(0xFF0504AA)

Colors similar to royal blue

Browse all Blue colors →

What is the RGB code for royal blue?

The CSS color royal blue in RGB format is rgb(5, 4, 170). Use this value directly in CSS, SVG, and most design tools.

How do I use royal blue in CSS?

To apply royal blue in CSS:

  • Text color: color: rgb(5, 4, 170);
  • Background: background-color: rgb(5, 4, 170);
  • Border: border-color: rgb(5, 4, 170);

What are all the color format values for royal blue?

FormatValue
HEX#0504aa
RGBrgb(5, 4, 170)
HSLhsl(240.4, 95.4%, 34.1%)
CMYKcmyk(97.1%, 97.6%, 0%, 33.3%)

How do I convert royal blue to RGB?

Select royal blue from the color name list in our color converter. The RGB value — rgb(5, 4, 170) — appears instantly alongside HEX, RGB, HSL and CMYK.

What color family does royal blue belong to?

royal blue belongs to the blue color family. It is a medium, vivid color with HSL values: hue 240.4°, saturation 95.4%, lightness 34.1%.

How do I create lighter and darker shades of royal blue?

Lighter variant (lightness 49.1%): #0706f5. Darker variant (lightness 19.1%): #03025f. These values are computed by adjusting HSL lightness ±15% while keeping the same hue and saturation.

What is RGB used for?

RGB defines colors using three values from 0 to 255 — red, green and blue intensity. It is the native format for screens, monitors and web browsers.