Blue hex code
The hex code for blue is #0000FF. In RGB that is rgb(0, 0, 255) and in HSL it is hsl(240, 100%, 50%).

The hex code for blue is #0000FF. In RGB that is rgb(0, 0, 255) and in HSL it is hsl(240, 100%, 50%).
Blue · #0000FF
Colour codes
- HEX
- #0000FF
- RGB
- rgb(0, 0, 255)
- HSL
- hsl(240, 100%, 50%)
- CMYK
- 100, 100, 0, 0
- CSS name
- blue
- Contrast on white
- 8.59:1
- Contrast on black
- 2.44:1
Tints and shades
20% lighter · #3333ff
40% lighter · #6666ff
60% lighter · #9999ff
80% lighter · #ccccff
20% darker · #0000cc
40% darker · #000099
60% darker · #000066
80% darker · #000033
Complementary colour
Blue · #0000FF
Opposite on the colour wheel · #ffff00
Frequently asked questions
What is the hex code for blue?
The hex code for blue is #0000FF. In RGB that is rgb(0, 0, 255) and in HSL it is hsl(240, 100%, 50%).
Can I use blue for text?
It has a contrast ratio of 8.59:1 on white and 2.44:1 on black. Body text needs 4.5:1 under WCAG AA, so it works as text on a white background.
What colour goes with blue?
Its complementary colour, opposite on the colour wheel, is #FFFF00. Pairing a colour with its complement gives the strongest contrast; for something calmer, use a tint or shade of blue instead.
Is blue a CSS colour name?
Yes. CSS accepts the keyword blue, so color: blue and color: #0000FF render exactly the same.