Skip to content

Blue

Blue is a medium, vivid color from the blue family. Hex code #0000FF.

Blue#0000FF

Color codes

  • CSS nameblue
  • HEX#0000FF
  • RGBrgb(0 0 255)
  • HSLhsl(240 100% 50%)
  • HSB / HSVhsb(240, 100%, 100%)
  • OKLCHoklch(45.2% 0.313 264.1)
  • CMYKcmyk(100%, 100%, 0%, 0%)

White text

8.59:1 · passes WCAG AAA

Black text

2.44:1 · fails WCAG

Shades

50#ECF2FF
100#C1D5FC
200#95B7FF
300#6C99F9
400#3F77FA
500#144FF6
600#002BD6
700#0008AA
800#00056F

Complementary

#0000FF
#6D510A

Analogous

#0000FF
#105D7F
#641DC4

Triadic

#0000FF
#9E1923
#14681B

About this color

Blue in CSS and design

Blue is a medium, vivid color from the blue family. Blue is one of the 16 basic color keywords, which go back to HTML 4, long before CSS had 148 named colors.

Use it in CSS by name or by any of its codes; these all give the same color:

color: blue;
color: #0000FF;
color: rgb(0 0 255);
color: hsl(240 100% 50%);

For text on blue, white reads best. Check other combinations with the contrast checker, or browse all CSS color names.

Frequently asked questions

What is the hex code for blue?

#0000FF. In CSS you can also use the keyword blue, which works in every browser.

What is blue in RGB and HSL?

In RGB it is rgb(0 0 255), in HSL hsl(240 100% 50%). For print, cmyk(100%, 100%, 0%, 0%) is a starting point, but CMYK depends on paper and ink, so check with your printer.

Should I use black or white text on blue?

White text works better: it has a contrast ratio of 8.59:1 and passes WCAG AAA. Black text reaches 2.44:1.

Which colors go with blue?

Its complementary color is #6D510A, on the opposite side of the color wheel. For a calmer look, combine it with its analogous neighbors #105D7F and #641DC4. The palette generator builds more combinations.