Skip to content

Blue Color

Pure blue #0000FF — the blue primary of RGB, with no red or green light at all.

HEX
#0000FF
RGB
rgb(0, 0, 255)
HSL
hsl(240, 100%, 50%)
HSV
hsv(240, 100%, 100%)
CMYKapproximation
cmyk(100%, 100%, 0%, 0%)
CSS name
blue

Open blue in the color picker to adjust it or copy other formats.

About blue

#0000FF is the CSS named color blue and one of the three RGB primaries: the blue channel is at its maximum and red and green are off. It is the most saturated blue a standard sRGB screen can show.

Although it looks vivid, pure blue is a dark color in terms of brightness, because the human eye is least sensitive to blue light. That is why white text on pure blue is easy to read, while pure blue on black is not.

#0000FF is the value of the CSS named color blue, defined in the CSS Color specification and identical in every browser.

Other colors called blue

  • Classic link blue #0000EEThe default color of unvisited links in many browsers.
  • Dodger blue (CSS) #1E90FFA brighter, friendlier blue for interfaces.

Blue shades and tints

Shades mix blue with black, tints mix it with white — useful for hover states, borders and backgrounds. Click a swatch to copy its HEX code.

Colors that go with blue

Color harmonies based on the hue of #0000FF: its complement on the opposite side of the color wheel, its analogous neighbours and its triadic partners.

Blue contrast and readability

On a blue background, white text reads best (8.59:1). Here is how blue works as a text color:

#0000FF on white

8.59:1

Normal text sample

Large text

  • AA normal text (4.5:1)Pass
  • AA large text (3:1)Pass
  • AAA normal text (7:1)Pass
  • AAA large text (4.5:1)Pass

#0000FF on black

2.44:1

Normal text sample

Large text

  • AA normal text (4.5:1)Fail
  • AA large text (3:1)Fail
  • AAA normal text (7:1)Fail
  • AAA large text (4.5:1)Fail

Pure #0000FF can feel harsh in interfaces. For buttons and links, most sites use a slightly lighter or less saturated blue — dodgerblue (#1E90FF) and royalblue (#4169E1) are common starting points.

Using blue in CSS and HTML

CSS custom property
:root {
  --color-blue: #0000FF;
}

.highlight {
  background-color: var(--color-blue);
}
Background and text color
.banner {
  background-color: blue;
  color: #ffffff;
}

.label {
  color: #0000FF;
  border: 2px solid rgb(0, 0, 255);
}
Inline style in HTML
<p style="background-color: #0000FF; color: #FFFFFF;">
  Blue background
</p>