Skip to content

Blue

Hex #0000FF, rgb(0 0 255). A blue CSS named color.

Open in palette generator

Blue color codes

Click any value to copy it.

HEX
RGB
HSL
HSV
HWB
CMYK
OKLCH
OKLab
Lab
LCH
CSS keyword

About Blue

Blue is a dark vivid blue with the hex code #0000FF. In RGB it is made of 0 red, 0 green and 255 blue; in HSL its hue is 240°, with 100% saturation and 50% lightness. Its perceptual lightness (OKLCH L) is 45.2%.

It is a CSS named color, so you can write "blue" anywhere CSS accepts a color. Against white it has a contrast ratio of 8.59:1 and against black 2.44:1, so white text reads better on it and passes WCAG AA for normal text.

Tints, shades and tones

Blue mixed step by step with white, black and middle gray (#808080).

Tints (with white)

Shades (with black)

Tones (with gray)

Blue 50-950 scale

A Tailwind-style scale built in OKLCH; the original color sits on the step with the closest lightness.

Colors that go with Blue

Color harmonies rotate the hue in OKLCH and keep the lightness and chroma. Each color links to its closest named color.

Complementary

Analogous

Triadic

Split complementary

Tetradic

Monochromatic

Contrast and readability

WCAG 2 contrast of Blue with white and black. The readable text color on Blue is white.

Blue textSmall text on white

On white8.59:1

  • AA pass
  • AA Large pass
  • AAA pass
  • UI 3:1 pass

APCA Lc 86

Blue textSmall text on black

On black2.44:1

  • AA fail
  • AA Large fail
  • AAA fail
  • UI 3:1 fail

APCA Lc -16

White text on Blue (#FFFFFF)

Test any pair in the contrast checker.

Color blindness preview

How Blue appears with each type of color vision deficiency (simulated with the Machado model).

  • Protanopia#0059FF
  • Deuteranopia#003DFB
  • Tritanopia#006B96
  • Protanomaly#004BFF
  • Deuteranomaly#0038FD
  • Tritanomaly#0046D7
  • Achromatopsia#4C4C4C

Colors similar to Blue

The closest named colors by perceptual difference (OKLab).

Use Blue in CSS and Tailwind

CSS
.blue {
  color: blue; /* #0000FF */
  background-color: rgb(0 0 255);
  border-color: oklch(45.2% 0.313 264.1);
}
Tailwind CSS
/* Tailwind CSS v4: bg-blue-500, text-blue-700... */
@theme {
  --color-blue-50: #F8FAFF;
  --color-blue-100: #E6EFFF;
  --color-blue-200: #CDDEFF;
  --color-blue-300: #A7C4FF;
  --color-blue-400: #73A0FF;
  --color-blue-500: #5287FF;
  --color-blue-600: #336DFF;
  --color-blue-700: #0B48FF;
  --color-blue-800: #0000FF;
  --color-blue-900: #0024BC;
  --color-blue-950: #000053;
}

<!-- or the exact color, no config -->
<div class="bg-[#0000FF] text-[#FFFFFF]">…</div>