Modify a color-change logic.