sir , i want to know the exact stepwise algorithm of the function geteveragecolor. can you help please.