creating color averageing script