Is it possible to have a formula check the color index of a cell?

Example if A1 color index = 6 then X