Cobalt color: hex codes, shades and palettes

Palettes built around cobalt. Click any swatch to copy its hex code.

Cobalt is #0047AB — deep vivid azure. Below are its shades with hex codes, the values in every common format, and cobalt color palettes to copy.

Cobalt hex, RGB, HSL and OKLCH

#0047AB
HEX
#0047AB
RGB
rgb(0, 71, 171)
HSL
hsl(215, 100%, 34%)
OKLCH
oklch(42.8% 0.172 259.7)
On white
8.44:1
On black
2.49:1

Shades of cobalt

Eleven steps from one base color, generated in OKLCH so each step is an equal perceived step rather than an equal numeric one. Click a swatch to copy it.

Contrast and readability

Cobalt on white measures 8.44:1 and on black 2.49:1. WCAG AA asks for 4.5:1 on normal text and 3:1 on large text and UI components, so the higher of those two decides which background it belongs on. In the scale above, 500 is the first to clear 4.5:1 on white, at 5.40:1.

The contrast checker reports every level for a given pair and suggests the nearest passing shade on the same hue. The color picker builds this same scale from any color you paste in.

Related colors:blue, navy, royal blue, periwinkle, transparent blue, steel blue. See every shade on the colors index.