Sum according to color