Can the cell background be changed by formula?

I just need four different colors and would like to add to formula to change color of background.