Dyes and pigments are substances that impart color to a material. The term colorant is often used for both dyes (also called dyestuffs) and pigments. Dyes, also known as colorants in which the coloring matter is dissolved in liquid, are absorbed into the material to which they are applied.
Fluorescent switches have displayed many applications in the field of materials. In this work, we reported a photochromic dithienylethene containing a dansyl-based fluorescent dye, and investigated its photochromism and optical properties. Under the alternating irradiation of UV and visible light, it exhibited good photochromism and switchable fluorescence behavior in solution and in solid state. Interestingly, this fluorescent switch can be applied in the photo-responsive writing. It was worth mentioning that this dithienylethene was also used a photochromic indicator to carry out the fluorescent bioimaging in living cells and in vivo.