The town Chaouen in Morocco is known as "The Blue City" since most of the town is painted in shades of white and blue.
The town's now-absent Jewish population started the practice hundreds of years ago. Chefchaouen (or Chaouen, as it's also known) was founded in 1471, and shortly thereafter a wave of Jewish and Muslim refugees arrived from Andalusia, Spain. Jews lived alongside Muslims in Chaouen until 1760, when the local sultan ordered them to move into the medina. Jewish families built there, in the Andalusian style, and in all likelihood started adding indigo into the whitewash at this time in order to differentiate their houses from green-painted Muslim ones.
But Chaouen didn't become "The Blue City" until the 1920s, when the Jewish blue effectively became a trend. (After centuries of enforced isolation from the West, Chefchaouen came under Spanish control in 1927. Foreign rule in Morocco ended in 1956.)