Made palette switch on color change