Xerobit

Blue Hex Code and Color Values

Blue (CSS name blue) has the hex code #0000FF. In RGB it is 0, 0, 255, and in HSL it is 240 degrees, 100% saturation and 50% lightness.

Blue: #0000FF

  • Hex
    #0000FF
  • RGB
    rgb(0, 0, 255)
  • HSL
    hsl(240, 100%, 50%)
  • HSV
    240, 100%, 100%
  • CMYK
    100%, 100%, 0%, 0%
  • CSS name
    blue

Blue color values

FormatValue
Hex#0000FF
RGBrgb(0, 0, 255)
HSLhsl(240, 100%, 50%)
HSV240, 100%, 100%
CMYK (simple conversion)100%, 100%, 0%, 0%
Decimal255

CMYK is calculated with the standard formula from the RGB values. Printed colors depend on the ink and paper, so treat it as a starting point.

About Blue

Blue is a primary color in both light and pigment systems, appearing as a vivid, standard medium blue. It is the most common choice for hyperlinks and corporate logos worldwide. People naturally associate it with the sky and deep water. It is one of the 148 CSS named colors.

Shades and tints of Blue

Tints mix Blue with white and shades mix it with black. Each step changes the color by 10 percentage points.

StepTint (towards white)Shade (towards black)
10% #1A1AFF #0000E6
20% #3333FF #0000CC
30% #4D4DFF #0000B3
40% #6666FF #000099
50% #8080FF #000080

Color harmony for Blue

These colors keep the same saturation and lightness as Blue and rotate the hue around the color wheel.

SchemeColors
Complementary #FFFF00
Analogous #0080FF #8000FF
Triadic #FF0000 #00FF00
Split complementary #FF8000 #80FF00

Contrast and accessibility

Contrast between #0000FF and white is 8.59:1 (passes AAA). Against black it is 2.44:1 (fails). For text on a Blue background, white text is the more readable choice.

Use Blue in CSS

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

All four lines produce exactly the same color. The keyword blue is one of the CSS named colors, so it works in every browser without a color function.

Similar named colors

FAQ

What is the hex code for Blue?

The hex code for Blue is #0000FF. As a CSS color keyword you can also write blue.

What is Blue in RGB?

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

What color is closest to Blue?

Of the CSS named colors, mediumblue (#0000CD) is the closest match to Blue, followed by darkblue and navy.

More colors