Klyachko, Can, Binicioğlu, and Shumovsky (KCBS) have introduced an inequality which holds if there is a noncontextual hidden variable theory. It is called KCBS inequality. Its violation shows a contradiction between predictions of quantum theory and noncontextual hidden variable theories. Bell-Kochen-Specker (BKS) theorem also shows that there are no noncontextual hidden variable theories in quantum theory by showing that there is no value assignment on a set of all observables. Thus, its approach is different from KCBS inequality. In the present paper, we show a logical relation between KCBS inequality and a value assignment, and examine a consequence of this logical relation.