Chefchaouen (known locally as Chaouen) is also known as the Blue City. This is simply because the houses in the Medina are painted in white and blue.
The entrance to the riad
Why blue?
One reason given is that blue will drive away the mosquitoes
But I am more incline to believe that it was because the Jews that came here painted their houses in white and blue. The reason being that blue symbolizes the sky and heaven.