As E.R asked at Component and quasi-component think the following question has a positive answer. Am I right?
Question: Let $C_1$ and $C_2$ be two connected components of a completely regular space $X$ such that there exists $x\in X$ with $C_1\cup C_2\subseteq C_x$ and let $f$ be a real-valued, continuous function on $X$ such that $f (C_1\cup C_2)\subseteq\{0, 1 \}$ and $f(C_1)=\{0\}$. How can we show that $f(C_2)=\{0\}$?