Blue Color

HEX #0000FF · rgb(0, 0, 255) · hsl(240, 100%, 50%)

Blue color codes

Blue is one of the named colors every browser understands. In CSS you can write it as blue or #0000FF.

FormatValue
HEX#0000FF
RGBrgb(0, 0, 255)
HSLhsl(240, 100%, 50%)
CMYK100%, 100%, 0%, 0%
CSS nameblue
.example {
  color: blue;
  background-color: #0000FF;
  border-color: rgb(0, 0, 255);
}

Colors that go with blue

These harmonies keep the same saturation and lightness and rotate the hue around the color wheel.

#FFFF00Complementary
Yellow
#0080FFAnalogous
#8000FFAnalogous
#FF0000Triadic
Red
#00FF00Triadic
Lime

Tints and shades of blue

Tints mix the color with white; shades mix it with black.

#E6E6FF90% white
#BFBFFF75% white
#9999FF60% white
#7373FF45% white
#4D4DFF30% white
#2626FF15% white
#0000FFBase
Blue
#0000D915% black
#0000B330% black
#00008C45% black
#00006660% black
#00004075% black
#00001A90% black

Contrast and readability

Black text
2.44:1
fails
White text
8.59:1
passes AA and AAA

Use white text on blue. Ratios follow the WCAG 2 formula; AA needs 4.5:1 for normal text and 3:1 for large text.

Frequently asked questions

What is the hex code for blue?

The hex code for blue is #0000FF.

What is the RGB value of blue?

Blue is rgb(0, 0, 255): 0 red, 0 green and 255 blue on a 0 to 255 scale.

What color goes with blue?

Its complementary color is #FFFF00, which is closest to the named color yellow. Analogous and triadic matches are listed on this page.

Should text on blue be black or white?

Use white text. The contrast ratio is 2.44:1 with black and 8.59:1 with white. WCAG AA asks for at least 4.5:1 for normal text.

Similar named colors

Pick any other color with the color picker, or browse all named colors.