fixed the bug for undo and redo

undo and redo color setting had an error