We give quantitative bounds on the sparsity of a real polynomial with non-negative coefficients vanishing on a slice of the Boolean cube $\{\pm1\}^n$. We obtain similar bounds on the dimension of real orthogonal representations of (the complement of) Johnson-type graphs. The estimates are related to the classical problem about coloring of $\mathbb{R}^n$, as well as the existence of error-correcting codes. We also give a simple combinatorial application to $k$-fold Hadamard matrices.