Blue is a primary colour of light and in surveys is the colour most often named as people's favourite. The CSS keyword blue is the most saturated blue a screen can produce, #0000FF, which reads as slightly violet to many eyes; the blue chosen in the xkcd survey is a little lighter and greener. Blues range from navy and midnight to sky and baby blue.
Blue hex codes by source
Color names are not standardized, so the same name can point to different colors. Here is every definition of blue in our three sources, with how close each one is to the reference.
Royal blue is lighter and less violet than the pure screen blue. In numbers: the two are 34% similar (OKLab distance 0.165). See Royal Blue for its own codes.
Named shades of blue
151 names in the CSS keywords and the xkcd Color Survey belong to the blue family. They are sorted from light to dark; click a swatch to copy its code, or open the ones with their own page.
The same hue from light to dark, generated in OKLab so the steps look even. Click a step to copy its HEX code.
Colors that go with blue
Classic color-wheel combinations built on #0000FF, computed in OKLCH so the partners keep the same lightness and intensity. Each swatch shows the nearest common name.
Complementary
Analogous
Triadic
Split complementary
Blue with white and black text
White text8.59:1 · AAA
Black text2.44:1 · Fails
WCAG asks for a contrast of at least 4.5:1 for body text (AA) and 3:1 for large text. On a blue background, white text is the better choice.