Blue Color Code (#0000ff)

Blue is #0000ff in hex and rgb(0, 0, 255) — a medium blue. Below: every color format, tints and shades, harmonies and how readable it is as text.

Updated

Blue
#0000ff
CSS nameblue
Hex#0000ff
RGBrgb(0, 0, 255)
HSLhsl(240 100% 50%)
HWBhwb(240 0% 0%)
CMYK100%, 100%, 0%, 0%

Tints and shades

Color harmonies

About Blue

Blue (blue) is a medium, vivid blue with the hex code #0000ff, or rgb(0, 0, 255). In HSL it sits at a hue of 240°, 100% saturation and 50% lightness. It is one of the 148 named colors every browser understands, so you can write color: blue; instead of the hex value.

Using Blue for text and backgrounds

PairingContrast ratioWCAG
Blue text on white8.59 : 1AAA
Blue text on black2.44 : 1fails

On a blue background, use white text (8.59 : 1). WCAG asks for at least 4.5 : 1 for body text and 3 : 1 for large text. Check other pairs with the Contrast Checker.

CSS

.element {
  color: blue;               /* or #0000ff */
  background-color: #0000ff;
  border: 1px solid rgb(0 0 255 / 50%);
}

Similar named colors

Medium Blue (#0000cd), Dark Blue (#00008b), Navy (#000080), Royal Blue (#4169e1), Indigo (#4b0082), Dodger Blue (#1e90ff).

Color Name FinderPaste a HEX code to get its closest human-readable name and clean token names for your CSS, SCSS, JavaScript or Tailwind config.
Open the tool

Frequently asked questions

What is the hex code for blue?
#0000ff — that is rgb(0, 0, 255) and hsl(240, 100%, 50%). In CSS you can also just write blue.
Is blue text readable on white?
Its contrast ratio on white is 8.59 : 1, which passes WCAG AA for normal text.
What colors go well with blue?
Its complementary color is #ffff00; analogous colors #0080ff and #8000ff sit next to it on the color wheel.