Formation of rainbow