Abstract: | A novel colorimetric chemosensor with good sensitivity, specificity, and self‐reporting capability for chloramphenicol (CAP ) has been successfully constructed based on colloidal, magnetically assembled photonic crystals coupled with molecular imprinting. The colloidal, magnetically assembled, molecularly imprinted photonic crystals (CMA ‐MIPCs ) were prepared by assembling CAP in magnetic, molecularly imprinted nanohydrogels (MMIHs ) in a magnetic field. The magnetic assembly of photonic crystals and the sensing processes could be completed simultaneously when MMIHs were dispersed in CAP solutions and in a magnetic field, and the response time was less than 1 min. The CAP concentration could be visually determined from the color change of the CMA ‐MIPCs sensor. The diffraction color blue‐shifted from luminous yellow of the blank to purple in a 1.0 mg/mL CAP solution, with a determination limit of 1.0 × 10−3 mg/mL. It could provide a new strategy for qualitative or semiquantitative detection of CAP . |