#0000FF

Color family

Shades of blue

A deep, vivid blue leaning violet. The reference blue is #0000FF, as defined by the CSS named color.

HEX#0000FF
RGBrgb(0, 0, 255)
HSLhsl(240, 100%, 50%)
HSVhsv(240, 100%, 100%)
OKLCHoklch(45.2% 0.313 264.1)
CMYK*100, 100, 0, 0

* CMYK is a simple conversion without a print profile; ask your printer for exact values.

What color is blue?

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.

NameHEXSourceCompared with the reference
Blue#0000FFCSS named colorReference shown on this page
Blue#0343DFxkcd Color SurveyNoticeably different · 70% similar
Blue#0000FFColor Names (meodai)Same color

Blue vs Royal Blue

Blue
#0000FF
Royal Blue
#4169E1

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.

Light blue shades 34

Light Blue#ADD8E6CSSBaby Blue#A2CFFExkcdSky Blue#87CEEBCSS

Medium blue shades 61

Periwinkle#8E82FExkcdRoyal Blue#4169E1CSS

Dark blue shades 56

Blue#0000FFCSSNavy#000080CSS

Tints and shades of blue

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.

Use blue in CSS

.blue {
  color: #0000FF;
  /* or */ color: rgb(0 0 255);
  /* or */ color: hsl(240 100% 50%);
  /* or */ color: oklch(45.2% 0.313 264.1);
  /* CSS keyword */ color: blue;
}

More blue colors