Shades of Blue

Every useful blue, generated rather than hand-listed.

There are 27 named CSS colors in the blue family, ranging from Periwinkle (#ccccff) at the light end to Ink (#1b1b3a) at the dark end. The shades generated on this page all sit at hue 258° in OKLCH, so their lightness steps look evenly spaced instead of bunching up in the shadows the way an HSL ramp does.

Every shade of blue on this page is generated, not copied from a list. Each swatch sits at hue 258° in OKLCH with an even perceptual lightness step, so the ramp reads smoothly instead of bunching up at the dark end the way an HSL ramp does — and nothing is clipped outside what an sRGB display can actually show.

Click any swatch to copy its hex code. The sliders let you change how many shades you get, how intense they are, and how much the hue drifts across the ramp.

Three blue shades worth starting from

If you just need a blue that works, these three are safe picks at the light, mid and dark ends of the range.

RoleHexRGBContrast on white
Light blue — backgrounds, tints#c0d9ffrgb(192 217 255)1.44:1
Mid blue — accents, buttons#3d7edergb(61 126 222)4.01:1
Dark blue — text, borders#002f6ergb(0 47 110)12.87:1

Named shades of blue

24 named colors that fall in the blue range, sorted from darkest to lightest, with the contrast ratio each one achieves against a white background. Anything below 4.5:1 is not safe for body text on white.

NameHexRGBHSLOn white
Ink#1b1b3argb(27 27 58)hsl(240 36.5% 16.7%)16.61:1
Navy#000080rgb(0 0 128)hsl(240 100% 25.1%)16.01:1
Darkblue#00008brgb(0 0 139)hsl(240 100% 27.3%)15.3:1
Midnight Blue#191970rgb(25 25 112)hsl(240 63.5% 26.9%)14.85:1
Prussian Blue#003153rgb(0 49 83)hsl(204.6 100% 16.3%)13.43:1
Nautical#183a5argb(24 58 90)hsl(209.1 57.9% 22.4%)11.72:1
Indigo Dye#00416argb(0 65 106)hsl(203.2 100% 20.8%)10.69:1
Marine#014182rgb(1 65 130)hsl(210.2 98.5% 25.7%)10.1:1
Mediumblue#0000cdrgb(0 0 205)hsl(240 100% 40.2%)11.16:1
Cobalt#0047abrgb(0 71 171)hsl(215.1 100% 33.5%)8.44:1
Blue#0000ffrgb(0 0 255)hsl(240 100% 50%)8.59:1
Dusk#4e5481rgb(78 84 129)hsl(232.9 24.6% 40.6%)7.22:1
Sapphire#0f52bargb(15 82 186)hsl(216.5 85.1% 39.4%)7.15:1
Ultramarine#3f00ffrgb(63 0 255)hsl(254.8 100% 50%)7.91:1
Denim#1560bdrgb(21 96 189)hsl(213.2 80% 41.2%)6.1:1
Iris#5a4fcfrgb(90 79 207)hsl(245.2 57.1% 56.1%)6.08:1
Cerulean#007ba7rgb(0 123 167)hsl(195.8 100% 32.7%)4.78:1
Royal Blue#4169e1rgb(65 105 225)hsl(225 72.7% 56.9%)4.85:1
Steel Blue#4682b4rgb(70 130 180)hsl(207.3 44% 49%)4.11:1
Horizon#5a87a0rgb(90 135 160)hsl(201.4 28% 49%)3.88:1
Dodger Blue#1e90ffrgb(30 144 255)hsl(209.6 100% 55.9%)3.24:1
Cornflower Blue#6495edrgb(100 149 237)hsl(218.5 79.2% 66.1%)2.97:1
Deep Sky Blue#00bfffrgb(0 191 255)hsl(195.1 100% 50%)2.12:1
Light Steel Blue#b0c4dergb(176 196 222)hsl(213.9 41.1% 78%)1.78:1

Using blue in an interface

The two badges next to each generated shade are its contrast ratio against white and against black. The first step where one of them turns green is the lightest blue you can safely set body text in on that background — everything lighter is decoration, not copy.

For large areas, pick from the light end and let a darker shade of the same hue carry the text. That keeps the whole surface in one hue family, which is what makes an interface feel deliberate rather than assembled.

Frequently asked questions

What are the hex codes for shades of blue?

The ramp at the top of this page generates them — click any swatch to copy it. Three reliable picks are #c0d9ff for light, #3d7ede for mid and #002f6e for dark blue.

What is the hex code for blue?

The closest single answer is Sapphire at #0f52ba, but blue is a range rather than one value. This page lists 24 named blue shades and generates as many more as you want.

How many shades of blue are there?

Effectively unlimited — an 8-bit display can show over 16 million colors, and a large share of them read as this family. The useful question is how many distinguishable steps you need, which is usually somewhere between 9 and 12 for a design system.

What colors go well with blue?

Its perceptual complement sits at hue 78°, and the two neighbors either side of that make a softer split-complementary set. The palette generator builds all of them from any starting blue.

Which shade of blue is accessible for text?

On a white background you need 4.5:1 for body text. In the table above that is every row at or above 4.5:1 — generally the darker half of the family. The contrast checker will confirm any specific pair and suggest the nearest passing color if it fails.