Home / Colors / Blue hex code

Blue hex code

Pure blue: the blue channel at full strength with no red or green.

#0000FF Blue
HEX#0000FF
RGBrgb(0, 0, 255)
HSLhsl(240, 100%, 50%)
HSVhsv(240, 100%, 100%)
CMYKcmyk(100%, 100%, 0%, 0%)
Advertisement

About blue

Pure blue: the blue channel at full strength with no red or green. Its hex code is #0000FF, which is rgb(0, 0, 255): 0 red, 0 green and 255 blue on a scale of 0 to 255.

Blue is a cool color.

Blue tints and shades

Lighter tints (mixed with white) and darker shades (mixed with black) of blue. Click any of them to copy its hex code.

Colors that go with blue

Complementary

The opposite color on the color wheel, for strong contrast.

Analogous

Neighbors on the color wheel, for a calm, matching look.

Triadic

Three colors evenly spaced around the wheel, for a balanced, lively palette.

Split complementary

The two colors either side of the complement: contrast without clashing.

Text on blue

White text

8.59:1 · Passes AAA for all text

Black text

2.44:1 · Fails for text

For readable text, WCAG asks for a contrast ratio of at least 4.5:1 (3:1 for large text). White text is the better choice on blue. Test other combinations with the contrast checker.

Using blue in CSS

.element {
  color: #0000FF;
  background-color: rgb(0 0 255);
  border-color: hsl(240 100% 50%);
}
Advertisement

Frequently asked questions

What is the hex code for blue?

Blue is #0000FF. In RGB it's rgb(0, 0, 255), and in HSL it's hsl(240, 100%, 50%).

What colors go with blue?

Its complementary color is #FFFF00, which gives strong contrast. For a softer look, use analogous colors #007FFF and #7F00FF. Blue also pairs well with white.

Is blue warm or cool?

Blue is a cool color.

Should I use white or black text on blue?

Use white text. Its contrast ratio on blue is 8.59:1, versus 2.44:1 for black.

Similar colors

See all popular colors · All HTML color names · Open blue in the color picker

Advertisement