About blue
Pure blue: the blue channel at full strength with no red or green. Its hex code is #0000FF, which is rgb(0, 0, 255): 0 red, 0 green and 255 blue on a scale of 0 to 255.
Blue is a cool color.
Blue tints and shades
Lighter tints (mixed with white) and darker shades (mixed with black) of blue. Click any of them to copy its hex code.
Colors that go with blue
Complementary
The opposite color on the color wheel, for strong contrast.
Analogous
Neighbors on the color wheel, for a calm, matching look.
Triadic
Three colors evenly spaced around the wheel, for a balanced, lively palette.
Split complementary
The two colors either side of the complement: contrast without clashing.
Text on blue
White text
Black text
For readable text, WCAG asks for a contrast ratio of at least 4.5:1 (3:1 for large text). White text is the better choice on blue. Test other combinations with the contrast checker.
Using blue in CSS
.element {
color: #0000FF;
background-color: rgb(0 0 255);
border-color: hsl(240 100% 50%);
}
Frequently asked questions
What is the hex code for blue?
Blue is #0000FF. In RGB it's rgb(0, 0, 255), and in HSL it's hsl(240, 100%, 50%).
What colors go with blue?
Its complementary color is #FFFF00, which gives strong contrast. For a softer look, use analogous colors #007FFF and #7F00FF. Blue also pairs well with white.
Is blue warm or cool?
Blue is a cool color.
Should I use white or black text on blue?
Use white text. Its contrast ratio on blue is 8.59:1, versus 2.44:1 for black.
Similar colors
- Navy blue#000080rgb(0, 0, 128)
- Royal blue#4169E1rgb(65, 105, 225)
- Periwinkle#CCCCFFrgb(204, 204, 255)
- Cobalt blue#0047ABrgb(0, 71, 171)
- Violet#7F00FFrgb(127, 0, 255)
- Lavender#E6E6FArgb(230, 230, 250)
See all popular colors · All HTML color names · Open blue in the color picker