Using an additional field for store the current background and compare against it to generate proper color sequence