Sorry, a formula cannot reference the color of another cell..
You need an alternate method to "Flag" when you want the formula to calculate.
Say, put an x in A1, then the formula in B1 runs...
=IF(A1="x",A2+A3,"")
Technically, this formula calculates regardless if A1 is x or not.
But, if A1 is NOT x, then it just returns a blank ""
If A1 IS x, then it calculates A2+A3
Hope that helps.