Phase segregation is ubiquitously observed in immiscible mixtures, such as oil and water, in which the mixing entropy is overcome by the segregation enthalpy1–3. In monodispersed colloidal systems, however, the colloidal–colloidal interactions are usually non-specific and short-ranged, which leads to negligible segregation enthalpy4. The recently developed photoactive colloidal particles show long-range phoretic interactions, which can be readily tuned with incident light, suggesting an ideal model for studying phase behaviour and structure evolution kinetics5,6. In this work, we design a simple spectral selective active colloidal system, in which TiO2colloidal species were coded with spectral distinctive dyes to form a photochromic colloidal swarm. In this system, the particle–particle interactions can be programmed by combining incident light with various wavelengths and intensities to enable controllable colloidal gelation and segregation. Furthermore, by mixing the cyan, magenta and yellow colloids, a dynamic photochromic colloidal swarm is formulated. On illumination of coloured light, the colloidal swarm adapts the appearance of incident light due to layered phase segregation, presenting a facile approach towards coloured electronic paper and self-powered optical camouflage.