For the first time here, we report a colloid crystal capable of undergoing transition among three states in response to external stimuli. The colloidal crystal was assembled from poly( N-isopropylacrylamide) (PNIPAM) microgel and doped with poly( N-isopropylacrylamide- co-2-acrylamido-phenylboronic acid) (P(NIPAM-2-AAPBA)) microgel. The ordered structure was locked by in situ photopolymerization. Taking advantage of the different responses of the two microgels to external stimuli, defect state can be induced and erased reversibly. Particularly, because the dopant, that is, P(NIPAM-2-AAPBA) microgel sphere, shrinks with increasing glucose concentration, its size changes from larger than the host, that is, PNIPAM microgel sphere, to equal to the host, and finally smaller than the host. Therefore, upon addition of glucose, the crystal undergoes transition from a state with acceptor-type defect, to no defect state, and then to a state with donor-type defect. The transition among the three states is fully reversible. In addition, the response of the doped crystal to glucose is relatively fast.