Applications of inverse opal photonic crystal hydrogels in the preparation of acid–base color-changing materials

Hydrogels are three-dimensional (3D) crosslinked network hydrophilic polymers that have structures similar to that of biological protein tissue and can quickly absorb a large amount of water. Opal photonic crystals (OPCs) are a kind of photonic band gap material formed by the periodic arrangement of 3D media, and inverse opal photonic crystals (IOPCs) are their inverse structure. Inverse opal photonic crystal hydrogels (IOPCHs) can produce corresponding visual color responses to a change in acid or alkali in an external humid environment, which has wide applications in chemical sensing, anti-counterfeiting, medical detection, intelligent display, and other fields, and the field has developed rapidly in recent years. In this paper, the research progress on fast acid–base response IOPCHs (pH-IOPCHs) is comprehensively described from the perspective of material synthesis. The technical bottleneck of enhancing the performance of acid–base-responsive IOPCHs and the current practical application limitations are summarized, and the development prospects of acid–base-responsive IOPCHs are described. These comprehensive analyses are expected to provide new ideas for solving problems in the preparation and application of pH-IOPCHs.


Introduction
pH-sensitive hydrogels are pH-responsive because of the large number of alkaline (such as amino, hydroxyl, amide) or acidic (such as carboxyl, sulfonic acid, etc.) groups in their structures. 1s intelligent hydrogels, pH-sensitive hydrogels have attracted much attention in many research elds in recent years, such as biology, medicine, physics, the environment, textiles, and so on. 2,3pH-sensitive hydrogels have become the focus of research because of their unique responsiveness to pH changes in the external environment. 4Based on different pH sensitivities, pHsensitive hydrogels can be divided into swelling and shrinking types and sol-gel types. 5The molecular chains of these two kinds of polymers contain ionizable groups, such as carboxyl and amino groups.Taking the carboxyl group as an example, the molecular chain of this type of electrolyte or hydrogel is stretched in alkaline solutions and curled in acidic solutions.A change in the pH value of the solution can cause a further change in the molecular volume.Shao et al. 6 prepared a polyelectrolyte-sensitive membrane pH sensor by using an inclined ber grating and electrostatic self-assembly technology.With a change in the pH value of the solution, the hydrogel layer on the probe expands and contracts, which leads to a change in the optical refractive index, and the refractive wavelength shis to red with the increase in the pH value of the solution.
A pH-IOPCH is a kind of IOPCHs with pH-sensitive characteristics.This kind of gel contains a large number of weak acidic or basic groups that are easy to hydrolyze or protonate, and they can capture or release protons according to changes in the environmental pH value, which makes the hydrogel swell or shrink because of water absorption. 7As a color-changing device, compare with electronic color-changing devices, IOPCHs have the advantages of simplicity, low cost, rapid and reversible response, electromagnetic interference prevention, intuitive indication effects, and so on.Compared with test paper colorchanging devices, pH-IOPCHs have the advantages of allweather automatic monitoring and long-term reuse, which have led to them being used in many color-changing systems.][13] In recent years, a large number of design principles and high-performance pH-IOPCHs preparations have been reported.For example, Wang et al. 14 used metal hydroxide nanochains as templates to prepare a nano-porous polymer membrane with an adjustable pore size that was sensitive to pH and ionic strength using ltration technology; this membrane has a precisely adjustable size and has good prospects for application in the separation of ultrane nanoparticles.However, there are few reports on the development status, synthesis principles, main technical bottlenecks, and methods of improving tunable pH-IOPCHs' performance; therefore, this paper reviews the preparation and applications of pH-IOPCHs from three different perspectives: their development status, their color-changing response principle, and methods to improve their response performance.
The structure of the paper is as follows: rst, the synthesis of pH-IOPCHs is summarized based on various common materials, such as polyvinyl alcohol (PVA), polymethyl methacrylate (PMMA), polyvinylidene uoride (PVDF), and so on, including colloidal crystal balls, colloidal crystal bers, and colloidal particles.Then, the different discoloration principles of different IOPCHs lms are analyzed.Finally, several technical bottlenecks in the preparation of pH-IOPCHs and corresponding improvement measures are summarized and listed, and future development directions are discussed.

Structural color of IOPCHs
Aer the light wave enters the surface of an IOPC, light with a specic wavelength will be prohibited from propagating and reected, and an angle-independent light-wave diffraction effect will form on the surface, resulting in structural color, which will change with its lattice constant or refractive index. 157][18] Therefore, the structural color can be designed by adjusting the internal micro/nano structure of IOPC. 19Therefore, changing the refractive index or lattice constant of an IOPC via external stimulation can change the structural color of photonic crystals.IOPCs are 3D interconnected porous structures formed by lling polymers into the gaps of opal photonic crystals and curing them into hydrogels, and then removing the OPC template microspheres via chemical reagent etching, hightemperature calcination, and other methods.Because of its certain optical band gap, it shows bright structural colors. 20ince the IOPCHs lms have relatively different lattice distances and refractive indices, the obvious changes of unit cell volume and refractive index of the matrix confer editable color shi. 21,22Therefore, the internal cell structure color can be changed by using external stimulation to change the refractive index or lattice constant of IOPCHs.With the continuous development of various responsive polymers, the adjustment range of structural color is wider, and the color change mode is closer to the biological color change principle. 23,24For example, Wu et al. 25 combined the pH-responsive luminescent pyrene tetracarboxylic acid (PTCA) into poly (n-isopropylacrylamide)polyacrylamide (PNIPAM-PAAm) structure form a IOPCH lm, due to asymmetric swelling and deswelling reaction, lm color changes between dark brown and bright yellow in different pH environments.
Generally, nano-sized microspheres are dispersed in solvents to form monodisperse systems, and then, the OPC structure is prepared and constructed via self-assembly reactions in microspheres, such as evaporation, pulling, vertical deposition, and interface self-assembly.Under the action of external physical and chemical stimulation, an IOPCH with an inverse structure can produce contraction and expansion reactions.The 3D periodic-ordered porous structure inside IOPCHs has a signicant ability to control the refractive index of the incident light, and the forbidden band can be directed to move to change its refractive index. 26,27The optical lattice constant of the IOPCs in a lm can be adjusted by changing the size of the OPC ball to adjust the peak reection position of the lm.
Furthermore, inspired by the unique natural ability of chameleons to change color to reect the surrounding environment, researchers have created responsive color-changing IOPCHs intelligent materials.IOPCHs have strong plasticity, making them very similar to biological tissue.They are bionic color-changing polymer materials with a 3D network structure that will change color aer being stimulated by the outside world. 28Because of its network structure and the existence of hydrophilic groups in its components, a hydrogel can absorb and store a large amount of water and can maintain its color state for a long time.It can be adjusted under the physical and chemical stimulation of mechanical forces, temperature, pH, ionic solvent, electricity, illumination, magnetic eld, and biological analytes, and it can then be converted into a visually recognizable color change reaction. 29herefore, hydrogels have great potential in adaptive sensing materials, optical display devices, anti-counterfeiting, molecular switches, medical diagnosis, and color-changing stealth technology. 30Stimulation-responsive IOPCHs are developing toward dual-responses and multi-responses to meet the induction requirements of a complex and changeable physical and chemical environment, so it is important to scientically and reasonably design and prepare intelligent color-changing hydrogels (Fig. 1). 31he common IOPCHs preparation methods include the colloidal self-assembly method, 35 diblock copolymer synthesis method, 36 self-cloning method, 37 and holographic lithography method. 38For example, Zhang et al. 39 used silica nanoparticles and polyvinyl alcohol to atomize and co-deposit on a solid substrate and then removed the silica via etching to form an IOPCH lm with short-range order, long-range disorder, and no iridescence effect, as shown in Fig. 2. Polymer-based exible materials with 3D network structures can be modied with specic functional groups on the hydrogel, and the hydrogel can respond to corresponding target stimuli. 40,41In addition, IOPCHs lms have many excellent physical and chemical properties, such as a 3D porous structure, strong mechanical expansion and contraction abilities, an easily adjustable refractive index, etc., and is suitable for multi-environment production and applications. 42,432 Color-changeable pH-IOPCHs lms Stimulation-responsive hydrogels are a kind of special hydrogel matrix, which can actively detect external stimuli and feedback certain responses.46,47 According to the types of stimuli that can be perceived, stimulus-responsive hydrogels can be divided into temperature-responsive hydrogels, light-responsive hydrogels, pH-responsive hydrogels, etc. [48][49][50] For example, Chen et al. 51 made a pH-responsive polyelectrolyte color-changing hydrogel by copolymerizing polyacrylic acid (PAA) and poly 2-(dimethylamino) ethyl methacrylate.
Because of its high plasticity, pH response discoloration IOPCHs has a wide range of applications in sensors, color display screen, encrypted steganography, protein delivery, drug release and other elds.For example, Janting et al. 52 proposed a miniature all-polymer ber Bragg grating pH sensor element with a sensitivity of (73 ± 2) pm/pH and a response time of less than 4.5 min, as shown in Fig. 3A(a).Mishra et al. 53 reported a color-changeable long-period ber grating IOPCH sensor with pH response.When the pH value of the solution changes, the change of the volume of the hydrogel coating will lead to the change of the resonance wavelength of the transmission spectrum, thus the pH of the solution can be obtained, as shown in Fig. 3A(b).Adjust the color of the IOPCHs by changing the pH of the environment, which can be used as a color display screen, as shown in Fig. 3(B).Xuan et al. 54 use polysiloxane hydrogels with different cross-linking degrees to regulate the response time difference of photonic crystals, so that the response of the low  cross-linked pattern area is faster than that of the high crosslinked non-pattern region, resulting in obvious color contrast patterns in the two regions, which can be used for anticounterfeiting steganography, dynamic identication and so on, as shown in Fig. 3(C).Smith et al. 55 prepared a loose crosslinked N-isopropylacrylamide (NIPAm) and acrylic acid (AAc) copolymer microgel, which showed high protein loading capacity and could control protein release by regulating the pH of the environment, as shown in Fig. 3(D).Lin et al. 56 prepared porous chitosan (CS) polyelectrolyte hydrogel microspheres by ionic cross-linking of sodium tripolyphosphate (Na + -TPP) and dextran sulfate (DS).CS/TPP/DS microspheres can transport ibuprofen from the stomach in an acidic environment to the intestines in an alkaline environment, as shown in Fig. 3(E).
At the same time, the 3D network unit in the pH-IOPCHs membranes contains a large number of polymerization monomers with hydroxyl, amide, carboxyl or amino groups, which have excellent hydrophilicity and their molecular weight and conformation can be easily controlled. 58In other words, the high editability nature of pH-IOPCHs membranes creates more available options for its application.Therefore, the pH-IOPCHs membranes can also be used in biomedical elds, such as biomass sensing, medical diagnosis systems, contact lenses and so on. 59Further, inspired by the chameleons' unique natural strategy of changing their skin color with the surrounding environment to adapt to and hide in the surrounding environment, the researchers imitated its color-changing principle, which stimulated the development of color-changing pH-IOPCHs membranes with advantages in real-time visual visualization. 60or example, Wu et al. 25 prepare a PNIPAM-PAAm/PTCA pH-IOPCH membrane with color-changing property based on asymmetric expansion behavior inside the gel, as shown in Fig. 4(A).Sol et al. 61 prepared a cholesteric liquid crystal pH-IOPCHs color-changing actuator, which produced asymmetric expansion characteristics aer acid treatment, and reversible color and shape changes could be controlled by humidity, as shown in Fig. 4(B).Wang et al. 62 synthesized a pH-IOPCH membrane capable of controlled deformation and color information encryption by copolymerizing pH responsive hydrogel (pH-Cgel), Eu 3+ coordinated red hydrogel (Eu-gel) and temperature responsive hydrogel (T-Bgel), as shown in Fig. 4(C).Chen et al. 63 prepared a double-layer hydrogel with both discoloration and deformability by combining the supramolecular assembly layer of polythyleneimide hyperbranched pertoluene diimide (PBI-HPEI) with a graphene oxide (GO)-PNIPAM layer.The color of PBI-HPEI hydrogel can be reversibly adjusted by the change of pH value, while the GO-PNIPAM layer shrinks and deforms when heated, as shown in Fig. 4(D).For example, Tang et al. 64 developed a double-layer color-changing pH-IOPCH membrane composed of monomer tetrad (4-pyridyl phenyl) ethylene (TPE-4Py) and Poly (sodium acrylamide-R-4-styrene sulfonate) (PAS).Due to the aggregation of hydrophobic TPE-4Py, it shows blue uorescence in neutral pH environment.When the pH is reduced, the TPE-4Py in the hydrogel is protonated and dissolved, causing the lm to turn yellow in color and become less bright, as shown in Fig. 4(E).

Preparation of color-changeable pH-IOPCHs film
To date, integrating photonic crystal nanoparticles into selfassembled block copolymers or crystal colloid arrays (CCAs) in polymers has been a common method of constructing pH-IOPCHs. 65For example, Asher et al. 66 designed a mechanically responsive photonic crystal hydrogel color-changing lm by embedding CCAs of polystyrene (PS) in the copolymer of Nvinylpyrrolidone and acrylamide (AM) for the rst time, which pioneered this eld.8][69][70] Aer years of development, IOPCHs have been prepared that can adjust the color-changing response of the cell volumes of pores in polymers to physical and chemical stimuli such as ion concentration, pH value, temperature, and solvent type, and the response speed and adjustment accuracy have also been greatly improved. 71,721 Three-step template method Template etching is the most important method of preparing IOPCHs at present; this method can be briey summarized in three steps.73 First, the nanoparticles are assembled to form OPC templates using appropriate methods.Second, an organic precursor liquid, such as a polymer monomer, organic metal salt, metal alkoxide, etc., lls the gap in the template and is then cured using ultraviolet irradiation or heating polymerization.Finally, the nanoparticle template is removed to obtain the IOPCH lm, as shown in Fig. 5.
The specic preparation steps of the three-step method can be briey summarized as follows: (1) assembling OPC colloidal microspheres into a 3D template; (2) lling the gaps in the template with polymer and curing; and (3) removing the template to prepare the IOPCH lm. 74For example, Kim et al. 75 directly added an 8 wt% (mass fraction) silk broin solution to a PMMA template to ll it; then, they dried it at room temperature for 24 h to volatilize the solvent and removed the template to obtain an IOPCH membrane with uniform pores and structural color.

Two-step method
The two-step preparation of IOPCHs membranes usually combines two consecutive steps in the three-step method into one, that is, combining the template assembly and highpolymer-content membrane material lling synthesis steps or the membrane material lling synthesis and the template removal steps.Compared with the three-step method, the twostep method is simpler, but combining the template assembly and lm-forming material lling into one step requires suitable solvents.Alternatively, by using the lm-forming material to ll the gap and removing the template at the same time, the lmforming material can be directly obtained by heating the precursor, as shown in Fig. 6.

Preparation of template
At present, there are only a few kinds of nanospheres used to prepare photonic crystals, such as SiO 2 , PS, PMMA, etc. Whether the assembled template is regular or not determines the uniformity of the holes in the IOPCHs lms.The common template assembly methods are described in Table 1.

Template lling
Template lling is a crucial step in preparing an IOPCH lm using the three-step method, and the lling rate directly affects its performance. 83The commonly used lling methods are described in Table 2.

Removal of template
The common methods for removing photonic crystal templates are as follows: (1) the heating method, which heats the lled template to a certain temperature to make it thermally decompose; (2) the chemical dissolution and corrosion method, For the composite OPC structure lled using the sol-gel method, heating can also concentrate the template structure and promote lm growth.However, in the heat treatment process, the polymer's inverse opal structure is prone to collapse, and the template can easily melt and adhere to the lm, so the heating method should be used with caution, as appropriate.For polymers that are not resistant to high temperatures, the template is oen removed via solution corrosion.Generally, the SiO 2 template is removed using hydrouoric acid, PMMA can be dissolved and removed using acetone, and PS can be removed with tetrahydrofuran or toluene. 88he above shows that the processes of preparing IOPCHs lms by stripping the photonic crystal template are similar, but the color-change principle and the inuencing factors of the lm's response performance are different because of the different colloidal materials used.In the following, the discoloration mechanisms of several common different types of acidbase electrochromic IOPCHs lms are described, and the inuencing factors of their discoloration responsiveness are summarized.

Discoloration mechanisms of different types of IOPCHs films
Based on the above, the advantages and disadvantages of several preparation methods for IOPCHs lms can be compared.The discoloration mechanism can be determined by combining changes in the physical and chemical properties of the IOPCHs lms in order to summarize the factors affecting its discoloration performance and the methods of improving its performance. 89Color-changeable pH-IOPCHs usually contain a large number of weakly acidic or alkaline molecular groups that are easily hydrolyzed or protonated.These molecular groups will ionize with changes in pH intensity in the environment and capture or release protons, such as ammonium salts, carboxyl groups, or sulfonic groups. 90These groups will dissociate or polymerize with the change in the environmental pH value, resulting in a change in the ion concentration inside and outside the hydrogel and the interaction force between polymer molecular groups; the physical properties, such as the porous unit cell volume and refractive index, will also change.
At the same time, these ionized groups will also destroy the hydrogen bonds between the molecular chains of the hydrogels, which will make the hydrogels swell or shrink because of water absorption, thus causing the volume to change in the porous unit cells inside the hydrogels.The shrinkage-swelling transition in hydrogels provides them with good qualities for use as pH sensors and in other elds.For example, Pabbisetti et al. 91 used the hydrogel expansion with changes in pH, thus causing the movement of Bragg grating, and prepared a wavelengthtunable optical ber sensor for pH tuning; their sensing system has a good linear shrinkage-expansion response in a pH range of 3-7, with a sensitivity of 12.16 pm/pH and good repeatability.pH-sensitive hydrogels based on biocompatible copolymers have also been widely used in drug detection systems. 92i et al. 93 reported on a pH sensor using single-layer photonic crystal polyelectrolyte gels.Because the protonation of pyridine groups in colloidal molecules produces weak cationic polyelectrolytes, this gel can show a rapid and remarkable swelling behavior in an acidic environment, and the difference in the pH value of the environment can be read based on the color change.Therefore, the two-dimensional (2D) polyelectrolyte photonic crystal can rapidly respond to external acid-base changes.Lee et al. 94 synthesized a pH-responsive color-changing IOPCHs using the colloidal crystal template method; hydrogel lms were prepared by copolymerization 2-hydroxyethyl methacrylate and acrylic acid (AA).The position of the diffraction peak shied with a change in the pH value, and the shi amplitude could be adjusted by changing the concentration of AA.Shin et al. 95 prepared a pH-responsive color-changing IOPCHs by lling the OPC template with polymer precursor, initiating photopolymerization using ultraviolet irradiation, and then removing the template.The hydrogel had a rapid response time of about 10 s; at the same time, it had high mechanical strength and environmental tolerance and it can even repeatedly display changing bright colors within half a year.

Principle of volume expansion discoloration
Generally, the discoloration reaction caused by the volume expansion of the hydrogel is the most widely used: amphoteric sensitive hydrogels contain both weak acidic groups and weak basic groups, so this kind of hydrogel can reduce or increase the swelling ratio when the acidity or alkalinity of the solution reaches a certain value; microscopically, this is caused by a shrinkage or expansion in the hydrogel's volume.Specically, pH-responsive hydrogels usually contain amphoteric groups such as carboxyl groups, amino groups, sulfonic groups, and so on, which can be protonated or deprotonated according to changes in the environmental pH. 96With a decrease in the solution's pH, the degree of protonation increases, the ion content in the hydrogel system decreases, the repulsive force between ions decreases, the intermolecular gap decreases, and the swelling rate decreases.Microscopically, the volume of the hydrogel shrinks, and macroscopically, the diffraction peak is blueshied, resulting in a corresponding color change response.With an increase in the pH value, the opposite change occurs.However, in a near-neutral environment, the positive and negative charges are neutralized, and the swelling rate of the hydrogel decreases. 97or example, Wang et al. 98 prepared a semi-permeable PAA-PSS network system made of a PAA hydrogel coated with polystyrene sulfonate (PSS).When the solution's pH value is 3, it is lower than the pK a of AA.Because the hydrophilicity of -COOH is lower than that of -COO − , the carboxyl groups in the network chain mainly exist in the nonionic form of -COOH; thus, the electrostatic repulsion between the charged groups is small, the hydrophilicity of PAA is weakened, and the hydrophobicity is relatively enhanced.Because of the hydrophobic interaction between the carbon skeleton and the sidechain methyl group, PAA adopts a highly compressed aggregation conformation, and the reection peak shis to blue.With an increase in the pH value from 3 to 8, the pH value of the solution is higher than the pK a of PAA, and the carboxyl group gradually transforms into the ionic form -COO − .At this point, the hydrophilicity of the PAA is enhanced, and the electrostatic repulsion between the charged groups gradually increases.The electrostatic repulsion of -COO − leads to the existence of PAA chains in an extended irregular linear conformation: the free energy of the system is minimized, the swelling ratio increases, and the reection peak is redshied.With the addition of PSS polyelectrolytes, the osmotic pressure of the network increased, and the osmosis and ionic electrostatic repulsion played a positive role in increasing the swelling ratio of the PAA-PSS. 99When the pH value is 8, the concentration of -COO − in the hydrogel reaches a maximum; accordingly, the electrostatic repulsion between the molecules rises to a maximum, and the swelling ratio of the sample reaches a maximum.However, if the pH increases to 14, the concentration of -COO − no longer increases, and external ions ow into the hydrogel network, which strongly increases the ionshielding effect, decreasing the swelling ratio. 100,101At this point, the osmotic pressure interaction inside and outside the membrane, the mutual repulsion of the ionic strength, and the mutual entanglement between the groups do not change with the pH value, as shown in Fig. 7.The change in the Bragg peak with pH is consistent with the pH response characteristics of IOH (I representing a carbonyl).Fig. 8(A) shows that the diffraction peak of 2-hydroxyethyl methacrylate (HEMA) IOPCH lms in different pH environments redshi from 505 nm at pH 2 to 687 nm at pH 9. The migration of the diffraction peak is caused by its dependence on the ionization of the carboxyl groups of IOH, which leads to the xation of IO − ions in the gel and enhances the osmotic pressure of the membrane. 103Therefore, with an increase in the pH value, the ionization rate of the carbonyl group increases, the gel swells, and the diffraction peak is redshied; furthermore, with the increase in the hydrogel's thickness, the diffraction peak shis more, as shown in Fig. 8(B).

Principle of copolymer discoloration
① There is an alternate-layered stacked structural membrane called a diblock copolymer that is formed by stacking two polymers with different electrolyte types.With an increase in the pH value, the conjugated segments of the hydrogel grow under the electrostatic repulsion, and the maximum absorption peak is redshied.For example, Xia et al. 105 prepared a layered stacked diblock copolymer (PS-b-P2VP) using PS and poly(2vinylpyridine) self-assembled; and introduced AA and HEMA monomers into the partially quaternized P2VP (QP2VP) layer using the spin coating method, obtaining a pH-responsive IOPCH lm.The positively charged P2VP layer showed highly reversible swelling in the acidic and alkaline pH ranges.The pH response of this type of IOPCH lm can be attributed to the alternating generation of excessive positive and negative charges, and three stop bands are generated.When the pH value of the solution is 9.5, the pK a of the protonated P2VP unit and the pK a of the AA unit are 4.9 and 4.7, respectively.When the pH value of the solution is 3.6, the unprotonated P2VP unit is protonated, but the AA unit has no charge at this pH value. 106cause there are two different types of pH-sensitive polymers in the lm, they have different expansion coefficients under the action of different pH values, and the relationship curve between their reection spectra and pH displays a U shape, showing a wide band gap shi (300-900 nm).However, when an ionic AA monomer is introduced into the charged QP2VP layer, it can cause an uneven monomer distribution because of interactions between the charges.This uneven distribution of the monomer components will cause uneven expansion and contraction of the hydrogel, forming an uncontrollable complex "rainbow color" and reducing the resolution accuracy for the naked eye. 107At the same time, given the inherent small refractive index contrast of the diblock copolymer, the lm shows a dark structural color, as shown in Fig. 9(A).The hydrogel layer formed by the copolymerization of AA and the N-isopropylacrylamide monomer on the silicon wafer creates the pH/temperature-sensitive IOPCH lm, as shown in Fig. 9(B).Therefore, Liu et al. 108 added TiO 2 , with a high refractive index, as one of the alternating layers of the layered stack using the spin coating method to improve the structural color brightness and color stability of the lm.Changes in the environmental acidity and alkalinity cause an expansion and a red shi in the colloid band gap or a contraction and a blue shi in the colloid band gap, the principle of the color change of lms in different pH environments is shown in Fig. 9

(C).
0][111] Introducing cationic groups via graing can endow hydrogels with pH responsiveness.For example, Lee et al. 112 prepared a gra pH sensitivity hydrogels, which composed of chitosan and PNIPAm.The synthesis method for this hydrogel is shown in Fig. 10(A).The molecular structure of CS contains amine and hydroxyl groups, so a hydrogel made of CS can respond in a certain pH range in acid-base environments. 113Nath et al. 114 introduced GO to a CS network and the swelling rate of the IOPCH membrane increased by 60-160 times, as shown in Fig. 10(B).Li et al. 102 synthesized a pH-sensitive semi-interpenetrating network hydrogel P(CS-co-AA-co-DMAMEA) with high mechanical strength from CS, AA, and the DMAEMA monomer via freeradical polymerization in water, as shown in Fig. 10(C).
③ In addition to copolymerization, graing, and the doublenetwork (DN) structure, there are other structural forms and even natural amphoteric polymers, as shown in Fig. 11.For example, the manufacturing steps of independent silk opal are as follows, as shown in Fig. 11(A): obtaining optical-grade silk broin solution from silkworm cocoons; generating PMMA opals with diameters of 250, 320, and 500 nm on silicon substrates; inltrating PMMA opals onto silicon wafers using the silk broin solution; removing the silk broin lm from the silicon wafer aer drying; and dissolving the PMMA balls in the silk broin lm using acetone.Different colored IOPCH lms and their corresponding SEM images are shown in Fig. 11(B).The color of the relevant structure under biological tissue and the reection curve in its corresponding visible spectrum are shown in Fig. 11(C).Schematic diagram of a cholesteric liquid crystal network PAA polymer network changing its incident light wavelength along with its pH value is shown in Fig. 11(D).
Mahdavinia et al. 115 prepared a semi-interpenetrating polymer network IOPCH composed of CS and PAM and found that it shrank and swelled several times in a solution ranging from pH  2 to pH 10.Other natural polymers have both amino and carboxyl groups; the molecular chain of gelatin contains hydrophilic groups such as -NH 2 , -OH, and -COOH, which can be used as matrix materials for hydrogels. 116Pettignano et al. 117 synthesized a pH-responsive biomass hydrogel with a selfrepairing ability by constructing a dynamic covalent bond between gelatin and sodium alginate oxide.Aer soaking in NaOH solution at pH 13, the hydrogel still had a self-repairing ability, but aer soaking in an HCl solution at pH 1.36, the hydrogel lost its self-repairing ability, which conrmed the Schiff base bond (-N]CH-) pair between the gelatin and sodium alginate oxide.
Taking poly(Schiff bases) (PSBs) as an example, Ji et al. 118 synthesized a PSB lm containing N-(4-aminophenyl)-N-(p-tolyl) benzene-1,4-dialdehyde via polycondensation.At rst, the lm was light yellow, with absorption peaks at 332 nm and 400 nm.With the introduction of hydrochloric acid vapor, the absorption peak shied to 537 nm.These changes can be attributed to the protonation of N, where the N in the C]N double bond is protonated by acid and p electrons in the donor-absorber structure of the polymer are separated, which leads to overlapping electron clouds, a reduction in the energy gap, and the red color of the lm.When PSB solutions turn purple, the color change is not obvious aer adding acid, and the color of PSBs changes from purple to light yellow aer introducing ammonia.This is because protonated N + is neutralized in alkali as it obtains electrons, and its color becomes the original color.

Principle of hole parameters discoloration
Because an IOPCH membrane is composed of porous spaces connected by hydrogels, solutes can diffuse through both pore spaces and the hydrogel networks.When the IOPCH membrane is in an acidic environment, it can be known from above, the hydrogel shrinks obviously, the volume decreases, the pore spaces increase relatively and are lled with free solution.Because the pore space is dominant and highly interconnected, most solution ions generally diffuse rapidly through the pores and then penetrate the hydrogel, which leads to the acceleration of the response time of ion diffusion (even just need 8 s). 121n alkaline environments, hydrogels expand in volume, occupying a lot of pore space; the solution permeates and diffuses through the hydrogel network, and the ion diffusion response time is relatively slow.A low pH stimulates hydrogels to shrink, and IOPCHs lms internally maintain the porous structure of spherical hollows; the movement of the solution is mainly capillary diffusion through the holes.Assuming that the lateral expansion is small aer the pH value increases, the pore space is lled with the expanded hydrogel, the porous structure of the IOPCHs extrudes and deforms, and the solution mainly permeates and undergoes mass transfer along the hydrogel network.In short, in alkaline conditions, the hydrogel is stimulated to expand, the pore diameter is small, and the solution ions mainly permeate and transfer mass along the hydrogel cell walls; in acidic conditions, hydrogels shrink, the pores are larger, and the solution ions mainly diffuse and undergo mass transfer along the pores (the IOPCH membrane is xed on the substrate, thus limiting the lateral expansion). 122Therefore, high porosity can also improve the color change rate, and at the same time, the color change response time of a hydrogel at low pH is shorter than that of one at high pH.
Because OPCs have periodic arrangements, they can be analyzed as multilayer lms with superimposed, twodimensional (2D) porous crystal-structure single-layer lms.According to Langmuir-Blodgett theory, IOPCH intramembranous structural units can be regarded as a combination of random CFC and HC crystal pore structures.Therefore, they can be analyzed using Bragg's optical law as follows: where l max is the wavelength at the maximum Bragg diffraction peak, D is the diameter of the inner hole of the hydrogel, m is the order of Bragg diffraction, d is the lattice constant, D/D 0 represents the expansion degree of the hydrogel (D and D 0 are the diameters of the inner hole of the hydrogel in the equilibrium state and the reference state under certain conditions, respectively), n a is the average refractive index of the porous hydrogel to light, and q is the included angle between the incident light and the diffraction crystal plane.According to this equation, when the environmental pH changes, the swelling degree of the hydrogel changes, and the diffraction peak of incident light shis accordingly.
Based on pH stimulation, the optical diffraction peak position and the corresponding structural color of the IOPCHs lms changed obviously.IOPCHs membranes contain weak acid (such as the carboxyl group) or weak base (amino group) pHsensitive polyelectrolyte hydrogels; a change in the external pH will shi the acid-base dissociation balance of hydrogel molecules, and the molecular chains will reunite or disperse, resulting in the expansion or contraction of the hydrogel volume. 124This transfer of internal structure changes the lattice parameters of the internal holes of the IOPCH lm.It can be seen that a change in the lattice constant, d, is the main reason for the obvious difference in the l max and the structural color under the same IOPCH lm thickness. 125Conversely, the change in the environmental pH value can also be semiquantitatively or quantitatively analyzed by directly observing the color change of the lms with the naked eye or by testing the diffraction spectrum.
By adding buffer with a pH lower than 5, the pH value of the membrane can be reduced, the contraction of the membrane can be promoted, and the l max of the membrane can be blue-shied.The larger the pores, the greater the change in the l max value.Generally speaking, without passing through an epoxy lter, an excessive strong UV light will leads to serious polymerization reaction with a high crosslinking density and irregular delamination in the hydrogel, eventually cause narrow pores and difficult liquid mass transfer, which is not conducive to shortening the response time.

Principle of sol-gel transition discoloration
There is also a kind of pH-responsive IOPCHs that can reveal the mutual transformations of the sol and gel states, which change with the pH value.Aer dissociation or hydrolysis, pH-sensitive groups further destroy hydrogen bonds in the hydrogel, eventually causing changes in its internal network structure.Zhang et al. 126 prepared a CS-based dynamic hydrogel with CS and functionalized polyethylene glycol as the main components.The two hydroxyl groups at the end of the polyethylene glycol chain were functionalized by benzaldehyde, which crosslinked the CS by a reversible Schiff base bond, and the hydrogel underwent a sol-gel transformation to generate a dynamic hydrogel.Because the aromatic Schiff base is sensitive to pH stimulation, it can trigger a shi in the Schiff base equilibrium and control the liquefaction or polymerization of the hydrogel.In the eld of dynamic covalent chemistry, hydrogels that undergo gel-sol transitions driven by the environmental pH include borates, hydrazones, and imines.
3.4.1 Borate esters.Some diols can be complexed with boric acid to form reversible borate, and the sol-gel characteristics of this borate complex are signicantly related to changes in pH. 127For example, Wang et al. 128 prepared a DN hydrogel with a pH response by using the crosslinking characteristic of the 1,3-cis hydroxyl group of the natural polysaccharide hydroxypropyl guar gum (HPG) and sodium borate (Na 2 B 4 O 7 -$10H 2 O).In the lower pH range, DN hydrogel crosslinked to form a denser HPG network, and the swelling rate decreased.Conversely, at high pH, the crosslinking of the HPG hydrogel network was inhibited, and the swelling rate increased because of a decrease in B(OH) 4 − .3.4.2Acylhydrazones.Acylhydrazone bonds are usually stable in neutral and alkaline conditions, but hydrolysis and cleavage are triggered in acidic conditions.pH-responsive hydrogels synthesized with this characteristic can realize the mutual transformation between the sol and the gel. 129Among these, hydrazone bonds formed by the reaction of hydrazide with a ketocarbonyl or aldehyde group under neutral or slightly acidic conditions are the most common.For example, Guo et al. 130 generated hydrazone hydrogels using the reaction between the keto polymer diacetone acrylamide and adipic dihydrazide.The hydrazone bond can be easily hydrolyzed into sol in an acidic medium, and the gel can be quickly formed aer the pH value is adjusted to above 5.0.
3.4.3Imines.Imine bonds are easy to hydrolyze in acidic conditions, and the gel changes into a sol state with a color change reaction. 131Yu et al. 132 used the fact that imine bonds are easy to hydrolyze in acidic conditions and found that this kind of imine hydrogel can produce a sol-gel color change response based on the difference in the pH environments between cancerous tissue and normal tissue.Tao et al. 133 used a Schiff base reaction between polyethylene glycol (PEG) and pentaerythritol tetra (3-mercaptopropionic acid) ester (PETMP)-allyl urea (AU) to synthesize a PETMP-AU-PEG hydrogel which was highly sensitive to pH changes.
3.4.4Other inuencing factors.The swelling and shrinkage mechanisms of weak electrolyte hydrogels are extremely complex, and the existing models are mainly divided into a three-phase model and a multi-effect-coupling response model. 134In the three-phase model, the three phases are the solvent phase, the free ion phase, and the polymer network phase.This model uses constitutive relations, momentum conservation, and mass conservation to analyze the swellingshrinkage behavior of hydrogels in different conditions. 135The electrochemical and mechanical equations coupled via hydration are collectively called the multi-effect-coupled pH response model. 136This model is based on geometrically nonlinear nite deformation theory and generally consists of highly nonlinear coupling parts and ordinary differential equations in the coupling domain, which can better study the large deformation behavior of pH-sensitive hydrogels and the local swelling changes in hydrogels. 137,138nvironmental factors such as temperature, solvent composition, and ionic strength will also affect the characteristics of hydrogels. 139Li et al. 140 studied differences in the pH sensitivity of g-polyglutamic acid hydrogels in two different solutions, NaCl and CaCl 2 .The gel pH sensitivity of hydrogels in CaCl 2 solutions is very weak, and the swelling rate of hydrogels in solutions at pH 1-7 varies from 2.5 to 5 g g −1 .The gel pH sensitivity in the NaCl solution in the same pH range is very strong, and the swelling rate varies from 5 to 28 g g −1 .Similarly, for example, Yan et al. 141 found that the molecular weight of hydrogels can also lead to a difference in pH sensitivity.Aer the crosslinking of poly-Lglutamic acid/CS, when the pH is less than 7, the network structure gel with a low relative molecular weight is loose.In acidic conditions, water molecules mainly diffuse into the gel by swelling, and small molecular hydrogels are more sensitive to the pH of the solution.With a gradual increase in the pH value in alkaline conditions, the carboxyl groups on the hydrogel segments begin to ionize, and more COO − ions are generated compared with gels with a high molecular weight.Therefore, macromolecular hydrogels are more sensitive to a solution's pH.
Otherwise, the dynamic characteristics of metal coordination of IOPCHs membranes can also make hydrogels reversibly form and separate the metal coordination under different pH stimuli, and they show different colors by forming different metal-chelating bonds. 142For example, Weng et al. 143 used iminodiacetate (IDA) as a ligand to bind Eu 3+ ions, which can also be used as crosslinking agents to construct hydrogel networks.When the pH of a solution is acidic, Eu 3+ ions dissociate from IDA ligands; when the pH of a solution is alkaline, the coordination of Eu-IDA can be restored, and the reverse reversible transformation occurs, as shown in Fig. 12.

Principle of thickness change discoloration
According to research work by Tanaka et al., 144 there is a relationship between the response time of ions in an IOPCH membrane and the volume of hydrogels; formula (2) shows that the response time required for the expansion-contraction of an IOPCH membrane stimulated by an external acid or alkali is directly proportional to the square of its thickness and inversely proportional to the effective diffusion rate of the ions in polyelectrolyte hydrogels or water; thus, multilayer IOPCH membrane usually have longer response times.Therefore, reducing the membrane thickness and volume fraction of polyelectrolyte gels as much as possible can effectively shorten the response time of an IOPCH membrane.The following is an example of an equation for calculating the response time: In formula (2), V and V 0 are the nal volume and initial volume of the IOPCH lm, respectively; L 0 is the thickness of the IOPCH lm; D H + is the effective diffusion rate of ions in polyelectrolyte IOPCH or water; [A] is the concentration of carboxyl groups in the IOPCH lm; and K a is the dissociation constant of the carboxyl group in water.Li et al. 145 prepared a pH-responsive single-layer polyelectrolyte IOPCH lm with a thickness of 470 nm; this lm could reach a response equilibrium state in only 6 s.Although it only has a submicron thickness, it still has good color visibility to the naked eye, as shown in Fig. 13.
A critical analysis of the swelling process reveals two underlying molecular processes: the penetration of the solvent molecules into void spaces in the network and the subsequent relaxation of the network segments.According to the research results of Dengre, 147 the diffusion coefficient, D, of water in an IOPCH membrane can be obtained using the following formula: 148 where F denotes the amount of the solvent fraction at response time t, k and n are constants, and r is the thickness radius of the hydrogel.
In different pH solutions, the n values of all kinds of hydrogels are between 0.5 and 1, which shows that solutions with different pH values have no obvious inuence on the initial diffusion behavior of hydrogels, and they all belong to the non-Fickian diffusion mode.It also shows that the diffusion rate of water molecules is equivalent to the relaxation rate of gel network macromolecules in the initial stage of swelling in IOPCH membrane. 92,96 Here, l 0 , [AA], K a , and D ion respectively denote the hydrogel thickness, the concentration within the hydrogel, the acid dissociation constant, and the diffusion constant of proton.The ionization degree of -COO − generated via hydrolysis in strong alkali solutions is determined by the pK a and pH values of the solution.In an acidic environment, -COO − on the skeleton of a hydrogel combines with H + in the solution to generate carboxylic acid, which leads to a decrease in the osmotic pressure inside the hydrogel and a corresponding reduction in the volume of the hydrogel, until it reaches equilibrium. 92At the same time, the pores between colloids in the IOPCH membrane expand, and the reection peak is blueshied.In alkaline conditions, given the mass transfer of solutes through the swollen hydrogel, the diffusion is much slower, and this hindered diffusion is reected by t 2 , which is different from the rapid diffusion t 1 , because there are still some pore spaces inside the hydrogel. 98When the pH of the solution is increased to 9 or even greater, the ionization of carboxyl groups on the hydrogel is complete, and the hydrogel lm expands, resulting in a reduction in the colloid volume between reverse opal structures and a redshi of the reection peak of the lm.Further increasing the pH will only increase the ionic strength of the solution, but will lead to the contraction of the hydrogel.Given the mass transfer of solutes through the swollen gel, the diffusion is much slower, and this hindered diffusion is re-ected by t 2 , which is different from the rapid diffusion t 1 , because there are still some pore spaces in the hydrogel. 149he above shows that the principles of color-changing reactions vary greatly dependent on the different components of hydrogels.At the same time, the main factors that determine the response performance of a color-changing lm are as follows: the material composition of the lm, the synthesis conditions (such as ultraviolet irradiation time, light intensity, temperature, etc.), the appropriate thickness, and the regularity of the porosity of the lm.These are the key factors for increasing the color-changing response performance of the membrane, reducing the response time, optimizing the pore composition in the membrane, and changing the physical and chemical properties of the membrane surface.Next, several specic directions for improving membrane performance are summarized based on the preparation methods.

Discussion
The above pH-IOPCHs lms have some shortcomings, such as a relatively long response time, incident light angle dependence, and a lack of further complex structures.If these shortcomings can be improved on, the development of advanced color-changing optical equipment can be promoted.Based on our analysis of the discoloration principle of hydrogels, the main technical improvement directions are as follows: (1) Because the band gap position or structural color of pH-IOPCHs lms can dynamically change in the visible light range with external stimuli, adjusting the hydrophilicity and hydrophobicity of a membrane surface can effectively regulate the mass transfer of the solution, and an appropriate lm surface roughness can accelerate the swelling balance of the gel system and improve the response rate. 150Because surface hydrogen bonding and hydrophobic interactions affect the mass transfer process between ions in the solutions and the gel network, generally speaking, the stronger the surface hydrophobicity, the more difficult the mass transfer.Yin et al. 151 prepared a pH-IOPCH membrane that can change its surface roughness, and its response speed can be adjusted based on different hydrophilic and hydrophobic properties of the membrane surface.Takeoka et al. 152 studied the inuence of hydrophilic and hydrophobic crosslinking agents on the swelling behavior of a poly (isopropylacrylamide) gel network.They found that the gel modied by hydrophobicity could reach its deswelling equilibrium more quickly, mainly because hydrophobic chains gathered during the gel contraction, forming large crystal nuclei and water-rich regions, which communicated with each other to form water channels.Thus, water could be discharged from the channels more freely, and the gel contraction was accelerated, as shown in Fig. 14.
(2) The mass transfer speed of a solution in a membrane also depends on the internal structure of the membrane.With the same membrane thickness and pH environment, the crosslinking density, pore spacing, and pore size parameters of the membrane play a decisive role in the response speed. 154In the synthesis process, when ultraviolet irradiation is too strong or the irradiation time is too long, the hydrogel has a high crosslinking density, smaller interconnected pores, a larger hydrogel content, and a smaller expansion-contraction degree in the same pH environment. 155Therefore, optimizing the exposure time, intensity, and wavelength of the ultraviolet lamp reasonably is one of the keys to realize the rapid-response of pH-IOPCHs lms.
(3) The inuence of changes in the pK a value of a hydrogel on its expansion coefficient at different pH values plays a decisive role in its color changes.The complete balance expression of the inuencing factors of the Flory-Huggins mixed term can be used to explain the relationship between the color redshi term of the IOPCH membrane in an acid-base solution and environmental factors, that is, the composition of the polymer network, its porous structure, elastic contraction and expansion parameters, changes in the pH value, and the comprehensive contribution of the solution's ion concentration to membrane osmotic pressure, as shown in the following formula: where R is the atmospheric gas constant; T is the ambient temperature; K a is the acid-base equilibrium constant in a neutral solution; the polymer volume fraction of the hydrogel is V 2r ; the polymer volume fraction of the swollen gel is V 2s ; 4 is the number of branches in a hydrogel crosslinking network site; p ion is the pressure difference in exchanged ions inside and outside the hydrogel; V 1 is the molar volume of the solvent; and f i is the molar fraction of ionic units in the gel system.( V r ) is the average molar volume of the pore repeating unit in the polymer, I is the ionic strength in the swelling medium, c is the swelling parameter in the polymer-solvent interaction, r is the density of the polymer network, and (M c ) is the average molecular weight of the gel crosslinked network.
A volume change will lead to a deviation in refractive index, and then, the color will be different.The formula more intuitively reects the relationship between environmental temperature, ionic strength, environmental pH, the polymer expansion coefficient, polymer volume change, and other related parameters.
(4) Increasing the porosity or pore size of pH-responsive hydrogels is another effective way to shorten the response time of IOPCH membrane because they are usually porous structures formed by removing the opal structure template from the functional hydrogel via dissolution or chemical etching. 157If there is a large number of continuous holes in the IOPCH membrane compared with a homogeneous hydrogel with the same composition and quality, this provides a large number of water paths for the solution ions to diffuse through by capillary action inside the gel, which improves the effective diffusion rate of the solution ions and effectively shortens the response time.
(5) Reducing the thickness reasonable can effectively balance the response rate and service life of hydrogels.For example, Lee et al. 94 prepared a 23 mm thick pH-IOPCH lm made of modied PS-b-QP2VP using the colloidal crystal template method, and its response time was shortened to 20 min.Because the crosslinking density was small, the permeability was reduced, and the sensitivity of the IOPCH membrane was also improved to some extent.At the same time, the proper amount of HEMA and polymerization duration provided an optimized IOPCH membrane with improved mechanical stability and a long service life (more than 6 months), without prolonging the response time or deteriorating the pH response performance.In brief, a smaller crosslinking density, larger pore size, and relatively less hydrogel content can increase the diffusion paths of ions inside the hydrogel, improving the effective diffusion rate and greatly shortening the response time of the IOPCH membrane.(6) The usual way to optimize porous structures inside membranes is to optimize the synthesis parameters of the IOPCH membrane, which is highly dependent on the physical and chemical properties of its hydrogel.Griffete et al. 159 found that introducing a macroporous structural defect layer to an IOPCH membrane can signicantly improve its response rate, as shown in Fig. 15.By testing the properties of IOPCH lms with and without defect layers of the same thickness, they showed that IOPCH lm with defect layers have greater porosity, which affects the initial periodic uniform porous structure.Such a local defect state accelerates the ion capillary diffusion rate of the solution and shows a faster response rate (the fastest response time is less than 10 s).However, it is still difficult to prepare defect structures with good control because of the inherent microstructure defects in the self-assembly process of colloidal crystals.
(7) By modifying the surface of a hydrogel, such as by enhancing its hydrophobicity and increasing its mechanical strength, its service life can be improved.At present, hightoughness hydrogels mainly include the following: interpenetrating-DN-structure IOPCHs, inorganic/organic nanocomposite IOPCHs, hydrophobic-interaction-crosslinked IOPCHs, etc. 160 Among these, an interpenetrating-DN-structure IOPCH is a dense network structure copolymer formed by intertwining rigid and exible polymer networks.In the process of stress, the rigid network rst breaks to absorb energy, and the strength of the hydrogel is improved by a "sacricial bond", while the exible network is loose to better realize energy transfer and dispersion. 161,162 DN-structured IOPCH was rst proposed and successfully prepared by Gong et al., 163 as shown in Fig. 16, in which the rst network is poly-2-acrylamide-2-methylpropanesulfonic acid (PAMPS) gel and the second network is PAAm.Zheng et al. 164 used agar with strong intramolecular hydrogen bonding as the rst network and neutral PMMA as the second network to prepare an agar/PMMA interpenetrating DN gel with good mechanical properties and fatigue resistance.The tensile strength at break can reach 10 MPa, the elastic modulus can reach 1 MPa, and the breaking energy can reach 100-1000 J m −1 .Nanocomposite hydrogels are prepared by dispersing high-modulus nanoparticles into a polymer matrix via physical or chemical crosslinking, which toughens the hydrogels.165

Conclusions
Because of its unique 3D network porous structure and good optical and mechanical properties, IOPCH lm shows great potential for application in the elds of structural coloration, sensors, photocatalysis, and biomedicine.At the same time, designing and constructing polymer thin-lm materials with optically variable lattice porous structures inside colloids has strong development prospects.With ongoing research, more and more materials are being used to prepare pH-IOPCHs membranes, and the process is constantly being optimized and innovated, with the quality of the membranes becoming better and better.However, the performance of pH-IOPCH still faces great challenges and needs to be improved, as shown in Fig. 17.Based on the above comprehensive discussion of the preparation methods, discoloration principle, and inuencing factors of lm performance, the specic technical bottlenecks and solutions are summarized as follows: (1) Many kinds of OPCs with strong functions can be prepared using the template method, but during the prepolymer lling process, OPC templates may be destroyed by the prepolymers, and the limitations of template materials make it difficult to prepare large-area IOPCH lm, mainly because it is difficult to assemble large-area OPC templates.If large-area and defect-free OPC template assembly can be created, large-area IOPCH lm that meet practical application requirements can be prepared, but the larger the template area, the easier it is to produce defects.Many kinds of IOPCHs lms with strong functions can be prepared with the template method; however, during the prepolymer lling process, OPC templates may be corrupted.Therefore, it is particularly important to nd new synthesis methods, such as combining the template method with the spraying method and the continuous 3D printing method.
(2) At present, only SiO 2 , PS, PMMA, and a few other materials are commonly used as template microspheres to prepare IOPCHs lms; moreover, the lms can only be removed using traditional methods, such as acids and alkalis, high temperatures, and acetone.Acid hydrolysis corrosion removal damages the membrane material's body; high-temperature removal can easily lead to the collapse of the porous structure of the inverse opal; and acetone, as an organic solvent, can easily affect organic membrane materials.Therefore, nding a microsphere template material that can be removed without damaging the membrane matrix in mild conditions has gradually become the focus of research.Designing reasonable lm-forming conditions and controlling the preparation process are the keys to avoiding defects in IOPCH lm structures.(3) In addition, ultraviolet irradiation and high-temperature heating may also cause cracks and defects in IOPCH lm.The internal forces of organic colloids can also lead to incompleteness in the membrane, which will affect its optical properties.For example, when an ionic AA monomer is introduced to a charged QP2VP layer when an IOPCH lm is prepared using the copolymerization method, the monomer distribution is oen uneven because of interactions between internal ionic charges, forming an irregular "rainbow color" on the surface, which leads to inevitable structural defects.
(4) In theory, the high porosity, uniformity, and easy regulation of pores in IOPCH membrane can be applied to many elds, but in fact, the applications of pH-IOPCHs membranes are scarce at present, which may be due to the small thickness of the assembled crystal template, leading to membrane material that is too thin and mechanical strength that cannot withstand mechanical damage from the natural environment.This limits their application.Although the thickness should be as small as possible, which is the most effective way to improve the response time of IOPCHs lms, a too-small thickness will reduce the membrane's mechanical properties and affect its service life.Finding the optimal thickness solution between the response time and the mechanical properties of the membrane in certain conditions is also one of the key points to be addressed.
(5) Traditional polymer hydrogel materials are formed via the simple covalent bonding of polymer monomers or natural polymers.Because of the uneven distribution of covalent crosslinked link networks, hydrogels are easily damaged by external forces during use.Therefore, it is very important to design multifunctional high-toughness hydrogels to enhance their service life.Moreover, pH-IOPCHs membranes can be recycled for half a year at the longest, and their reusability needs to be improved.Repeated cyclic discoloration can easily lead to reductions in the environmental tolerance of IOPCHs membranes or even damage the porous structure in the membrane, resulting in problems such as insufficient color or an inability to change color.Therefore, the durability of the membrane's porous structure can be ensured by modifying the hydrogel network via plasticization, thus improving the service life of the membranes.It is of great importance to improve the performance of pH-IOPCHs and develop their potential application in real-time analyses, online detection, environmental stealth, and other elds.

Fig. 1 (
Fig. 1 (A) Schematic diagram of OPC and IOPC structures. 32Reproduced from ref. 32 with permission from Wiley-Blackwell, copyright 2001.(B) Natural light is reflected by different IOPCHs films to produce different colors. 33Reproduced from ref. 33 with permission from Elsevier, copyright 2019.(C) (a) Photo of the exoskeleton of a humidity-responsive beetle changing from khaki to black in a high-humidity atmosphere; (b) SEM image of a stratum corneum with an IOPC structure and schematic diagram of steam humidity response discoloration of a crustacean surface based on a hierarchical IOPC structure. 34Reprinted with permission from ref. 34.Copyright 2010 American Institute of Physics.

Fig. 2 (
Fig. 2 (A) (a) Schematic diagram of the preparation process for poly(lactic-co-glycolic acid) (PLGA) IOPCH film; SEM images of (b) the top surface of an OPC-structured film; (c) a composite OPCH film; (d) an IOPCH PLGA film, with corresponding optical crystal images as illustrations; (e) SEM images of the cross-section of a PLGA film; and (f) reflection spectra of OPC-structured film, composite OPCH film, and IOPCH film. 44Reproduced from ref. 44 with permission from Adv. Mater.Interfaces, copyright 2018.(B) (a) Photograph, (b) SEM image, and (c) corresponding Bragg reflection spectrum of silica OPC colloidal film obtained via TEOS hydrolysis under alkaline conditions.(C) (a) Photograph; (b) SEM image; and (c) corresponding reflection spectrum of the IOPCH film etched with an HF acid solution. 45Reproduced from ref. 45 with permission from Higher Education Press, copyright 2014.

Fig. 3
Fig. 3 Schematic diagram of discoloration pH-IOPCHs applications in (A) (a) Bragg grating sensors; 52 reproduced from ref. 52 with permission from IEEE, copyright 2019.(b) Long period fiber grating sensors; 53 reproduced from ref. 53 with permission from IEEE, copyright 2016 (B): color display; 57 reproduced from ref. 57 with permission from Elsevier, copyright 2010 (C): steganography encryption; 54 reproduced from ref. 54 with permission from Royal Society of Chemistry, copyright 2012 (D): protein delivery; 55 reproduced from ref. 55 with permission from American Chemical Society, copyright 2011 (E): drug release. 56Reproduced from ref. 56 with permission from Elsevier, copyright 2005.

Fig. 4 (
Fig. 4 (A) A schematic diagram of the synthesis principle of PNIPAM-PAAm/PTCA color-changing pH-IOPCH actuator film. 25Adapted with permission reproduced from ref. 25 with permission from Wiley-VCH Verlag, Copyright 2019.(B) The color change of cholesteric liquid crystal hydrogel before and after acid treatment and its shape change with humidity. 61Adapted with permission reproduced from ref. 61 with permission from Wiley-VCH Verlag, Copyright 2022.(C) The composite hydrogel composed of pH-IOPCH (pH-Cgel), Eu 3+ coordinated red hydrogel (Eugel) and temperature-responsive hydrogel (T-Bgel) shows editable deformation and discoloration functions. 62Reproduced from ref. 62 with permission from John Wiley & Sons, copyright 2023.(D) Photos of deformation and discoloration reaction of PBI-HPEI/GO-PNIPAM doublelayer pH-IOPCH composite membrane with pH value change. 63Adapted with permission reproduced from ref. 63 with permission from Wiley-VCH Verlag, copyright 2018.(E) Photo of the color, brightness and shape of the TPE-4Py/PAS double-layer PH-IOPCH composite film changing simultaneously with pH value. 64Reproduced from ref. 64 with permission from Wiley-VCH Verlag, copyright 2020.

Fig. 5
Fig. 5 Schematic diagram of (A) preparation of color polyvinylidene fluoride (PVDF) inverse opal structure film using the three-step method. 76Reproduced from ref. 76 with permission from John Wiley & Sons, copyright 2018.(B) Patterning of photonic crystals: (a) IOPCHs films were prepared via direct deposition, (b) exposing the porous IOPCHs films filled with SU-8 photoresist at 0°and 90°twice under ultraviolet light through a linear photomask, (c) then, superparamagnetic particles are arranged in chains under an external magnetic field, and the structure is partially fixed via exposure to a selective ultraviolet lamp to form a chain pattern, (d) thus forming a butterfly image consisting of blue and yellow pixels. 77Reproduced from ref. 77 with permission from Springer Nature, copyright 2011.

Fig. 6
Fig. 6 Schematic diagram of three-step (a) and two-step (b and c) preparation of an IOPCH membrane. 78Reproduced from ref. 78 with permission from Frontiers Media S.A., copyright 2020.

Fig. 7 (
Fig. 7 (A) Change in the swelling rate of Aam-HPMA-MA with time spent in salt solutions. 98Reproduced from ref. 98 with permission from Taylor and Francis Ltd., copyright 2006.(B) Schematic diagram of the changing state of the porous gel of an IOPCH membrane in a low-and high-pHvalue solution environment. 95Reproduced from ref. 95 with permission from Elsevier, copyright 2010.(C) (c1) Swelling ratio values of CS, AA, and 2-(dimethylamino) ethyl methacrylate (DMAEMA) copolymer IOPCH membrane in deionized water; swelling kinetics in (c2) different buffer solutions and (c3) salt solutions. 102Reproduced from ref. 102 with permission from Royal Society of Chemistry, copyright 2013.

Fig. 8 (
Fig. 8 (A) Optical response curves of IOPC-structured films soaked in solutions with different pH values.(B) The relationship between Bragg peak changes (dl) and the pH of IOH films with different thicknesses. 104Reproduced from ref. 104 with permission from American Chemical Society, copyright 2012.

Fig. 9 (
Fig. 9 (A) Schematic diagram of molecular-crosslink-modified PS-b-QP2VP membrane prepared using the copolymerization of AA and the HEMA monomer (above), and photos of a color-changing membrane in different pH environments (below). 105Reproduced from ref. 105 with permission from Royal Society of Chemistry, copyright 2011.(B) Schematic diagram of pH/temperature-sensitive dual-response PS-b-QP2VP film prepared using the spin coating method (above) and photos of a color-changing film in different pH environments (below). 108Reproduced from ref. 108 with permission from Elsevier, copyright 2015.(C) Schematic diagram of polymer crystal colloid array transformation.
10 (A) Synthesis roadmap of porous PNIPAAm IOPCH membrane prepared via graft copolymerization. 112Reproduced from ref. 112 with permission from John Wiley & Sons, copyright 2004.(B) Schematic diagram of network structure of GO/CS hydrogel with high swelling rate. 114Reproduced from ref. 114 with permission from John Wiley & Sons, copyright 2018.(C) Preparation roadmap of CS-co-AA-co-DMAMEA hydrogel. 102Reproduced from ref. 102 with permission from Royal Society of Chemistry, copyright 2013.

Fig. 11 (
Fig. 11 (A) (a-e) The manufacturing steps of independent silk opal.(B) Different colored IOPCH films and their corresponding SEM images.(C) The visible spectra of different colored IOPCH films. 119Reproduced from ref. 119 with permission from Springer Nature, copyright 2012.(D) Schematic diagram of PAA's light wavelength with pH value. 120Reproduced from ref. 120 with permission from Wiley-VCH Verlag, copyright 2015.

Fig. 12 (
Fig. 12 (A) Chemical structures of Eu-IDA; (B) schematic illustration of Eu-IDA sol-gel transition driven by dynamic metal-ligand coordination; 143 reproduced from ref. 143 with permission from Wiley-Blackwell, copyright 2018.(C) Analytical schematic diagram of the microstructure of an IOPCH film.

Fig. 13
Fig. 13 Photograph of color changes in single-layer ultrathin IOPCH film at different pH values. 146Reproduced from ref. 146 with permission from Royal Society of Chemistry, copyright 2012.

Fig. 14
Fig. 14 Accelerating the response of IOPCHs membranes with hydrophobic modification: (A) structural shrinkage mechanism of hydrophobicgrafted poly (N-isopropylacrylamide) gel induced by the environment; 153 reproduced from ref. 153 with permission from Springer Nature, copyright 1995.(B) Schematic diagram of the application of hydrophobic crosslinking agent polyrotaxane to modify gel in a dimethyl sulfoxide solution. 152Reproduced from ref. 152 with permission from American Chemical Society, copyright 2010.

Fig. 15
Fig. 15 Scanning electron microscope image of IOPCH films containing a macropore defect layer: (A) opal structure; (B) anti-opal structure. 159Reproduced from ref. 159 with permission from Royal Society of Chemistry, copyright 2011.

Fig. 16
Fig. 16 Structural diagram of (A) a DN-structured IOPCH network film 166 reproduced from ref. 166 with permission from Royal Society of Chemistry, copyright 2015.(B) Where the strength of the DN-structured IOPCH film (b2) is significantly higher than that of a single-network hydrogel (b1). 163Reproduced from ref. 163 with permission from Royal Society of Chemistry, copyright 2003.

Fig. 17
Fig. 17 Schematic diagram of factors affecting the performance of IOPCHs films and improvement methods.

Table 1
Advantages and disadvantages of different template preparation methods

Table 2
Comparison of different common filling methods for preparing IOPCHs membranes templates