Blue color codes
| CSS name | blue |
|---|---|
| HEX | #0000FF |
| RGB | rgb(0, 0, 255) |
| HSL | hsl(240, 100%, 50%) |
| CMYK | cmyk(100%, 100%, 0%, 0%) |
| Decimal | 255 |
Shades of Blue (darker)
#0000E6 · #0000CC · #0000B3 · #000099 · #000080 · #000066 · #00004D · #000033 · #00001A
Tints of Blue (lighter)
#1A1AFF · #3333FF · #4D4DFF · #6666FF · #8080FF · #9999FF · #B3B3FF · #CCCCFF · #E6E6FF
Color harmonies
| Complementary | #FFFF00 |
|---|---|
| Triadic | #FF0000, #00FF00 |
| Analogous | #0080FF, #8000FF |
Accessibility (WCAG contrast)
| White text on Blue | 8.59:1 · AAA |
|---|---|
| Black text on Blue | 2.44:1 · Fail |
Use Blue in code
.element {
color: blue; /* or #0000ff */
background-color: rgb(0 0 255 / 0.5);
}Frequently asked questions
What is the hex code for Blue?
Blue is #0000FF in HEX, rgb(0, 0, 255) in RGB and hsl(240, 100%, 50%) in HSL.
Can I use "blue" directly in CSS?
Yes. "blue" is one of the 148 standard CSS named colors, so color: blue; works in every browser.
Is Blue readable on white?
The contrast ratio of Blue on white is 8.59:1 (WCAG AAA). On black it is 2.44:1 (Fail).
What is the complementary color of Blue?
The complementary color (opposite on the color wheel) is #FFFF00.
Similar colors
Medium Blue#0000CDDark Blue#00008BNavy#000080Royal Blue#4169E1Indigo#4B0082Dodger Blue#1E90FFMidnight Blue#191970Blue Violet#8A2BE2
Convert any color with the Color Converter, generate palettes with the Random Color Generator, or browse all 148 CSS color names.