computing alternating section colors